I have a TranslateAnimation class in my class. Animation starts automatically.
I set the button so that if it is pressed, the animation will be canceled ( animation.cancel(); ).
I also installed AnimationListener for my class. If my animation ends, I will start a new action (you will go to the menu).
public void onAnimationEnd(Animation animation) { startActivity(new Intent(Class.this, Class2.class)); }
My application relies on the user to press a button before the animation ends. The problem is that animation.cancel(); allowed as end of animation.
How to cancel the animation in another way that was not taken into account as the end of the animation? Is it possible?
Thanks in advance!
source share