I have an ImageView on which I have applied a rotate animation. Since I want the rotation to go on continuously, I gave the repeatCount as infinite in my rotate.xml:
clearAnimation() on View is best solution , it stops and reset previous state of view.
You can also call anim.cancel();
but you should also call anim.reset();
immediately after it.
Then when you want to start it again, just call startAnimation
on the view.
Use clearAnimation()
to stop an animation. There is no loadAnimation()
on View
.