Android – How to stop an animation (cancel() does not work)

androidanimation

I need to stop a running translate animation. The .cancel() method of Animation has no effect; the animation goes until the end anyway.

How do you cancel a running animation?

Best Answer

Call clearAnimation() on whichever View you called startAnimation().