I just read: Android: How to stop the endless animation applied to ImageView? I tried, and it works fine, I set the animation in the onCreate() method of my activity using AnimationUtils.loadAnimation(AppContext, animationRes) , then I start the animation with startAnimation() and stop it with clearAnimation() . My problem is that if I start a new activity and then return to the animation, it no longer works. It seems that the animation has not even begun, the listener attached to the animation is not included in onAnimationStart() . Did I miss something?
onCreate()
AnimationUtils.loadAnimation(AppContext, animationRes)
startAnimation()
clearAnimation()
onAnimationStart()
Thanks!
Where do you call clearAnimation() .
IMHO, I think you need to call startAnimation () in onResume () and call 'clearAnimation ()' on onPause ().
Check it out and let us know.