I'd like to rotate an image 360 degrees continuously around a fixed point. I've seen a few examples already such as:
RotateAnimation anim = new RotateAnimation(0, 360,150,150);
anim.setInterpolator(new LinearInterpolator());
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(2000);
[imageview].startAnimation(anim);
This does rotate the image, but it does so on an arc/circular path. Ie. the image is moving/rotating in a circular motion but isn't staying fixed at it's starting location.
What I basically want is to mimic the rotation of a WindMill's arms.
Any thoughts?
Ok so I got this working perfectly after some tweaking. Like Macarse said, it did involve the padding around the
ImageView
.To fix this issue, all you have to do is put your
ImageView
inside aRelativeLayout
: