How to stop animation at end of cycle?

You can use rotation.setFillAfter(true);


Set the animation repeatcount to infinite before you start it, then when the action finishes, set the repeatcount of the animation to 0. The animation will finish the current loop and the stop without the jump that you want to avoid.

//How you start
Animation rotation = AnimationUtils.loadAnimation(this, R.anim.rotate);
          rotation.setRepeatCount(Animation.INFINITE);
iv.startAnimation(rotation);

//You do your stuff while it spins
...

//You tell it not to repeat again
rotation.setRepeatCount(0);

It's important that you first set it to Animation.INFINITE (or -1 since they do the same) and then to 0, if you set it to 1000 for instance, then it wont stop for some reason according to my testing.