Reputation: 1
I have some images, i want it to rotate like circularly in a Carousel fashion. please let me know how to do it in android platform if anybody knows...
Upvotes: 0
Views: 2465
Reputation: 14399
This code will rotate a view 360 degrees:
RotateAnimation rotateAnimation = new RotateAnimation(360,0);
rotateAnimation.setDuration(ROTATE_TIME);
myView.startAnimation(rotateAnimation);
To make it repeat:
anim.setRepeatCount(Animation.INFINITE);
If you want the movement to have an even speed through the entire animation, check out this question that I asked a few month ago:
Make ScaleAnimation move evenly, or figure out how it moves
Upvotes: 1