Animation a = AnimationUtils.loadAnimation(this,R.anim.translate_animation);
a.setAnimationListener(new AnimationListener(){
@Override
public void onAnimationEnd(Animation animation) {}
@Override
public void onAnimationRepeat(Animation animation) {}
@Override
public void onAnimationStart(Animation animation) {}
});
And you figure out eventually that any of the onAnimation* methods never get called, then you ran into the bug.
So far the only solution that I found was to make a subclass of the view that you're using and override the onAnimationEnd method with whatever you want to do. Like this.
Shoutout to Matt Quigley. He's a software engineer that works on mobile phones. Follow his blog and his excitement on Android Engineer
No comments:
Post a Comment
Hey There! Please leave a comment, suggestion, or the occasional flame (but only if its informational!)