Reputation: 3306
How to rotate imageview clockwise 10degree ,
then the imageview animation stop (at 10degree) rotate back(aniclockwise) to 0 degree in repeate?
I just know how to rotate to 10 degree, but I don't know how to return back to 0 degree.
Thank you very much.
imageview 0 degree → 10 degree → 0 degree ( repeat)
RotateAnimation anim = new RotateAnimation(x, y, 10f, 10f);
anim.setInterpolator(new LinearInterpolator());
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(700);
imageView.startAnimation(anim);
Upvotes: 3
Views: 1591
Reputation: 361
You have to set the repeat mode of animation.
anim.setRepeatMode(Animation.REVERSE);
Upvotes: 4