Im trying to stop the animation of an ImageView
when a button is clicked. The animation I am using is an AnimatorSet
consisting of 5 ObjectAnimators
... The problem is that I can't figure how to stop and clear this animation from the ImageView
when the button is clicked as btn.clearAnimation()
obviously doesn't work.
Thank you for your help.
If you had AnimatorSet
listeners added, make sure you remove the listeners before cancel.
animatorSet.removeAllListeners();
animatorSet.end();
animatorSet.cancel();