Last active
December 13, 2015 22:19
-
-
Save mikehibm/4983422 to your computer and use it in GitHub Desktop.
Example that produces an error on an animation end.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final ScaleAnimation scale = new ScaleAnimation(1.0f, 0.1f, 1.0f, 0.1f, | |
Animation.RELATIVE_TO_SELF, 0.5f, | |
Animation.RELATIVE_TO_SELF, 0.5f); | |
final AlphaAnimation alpha = new AlphaAnimation(0.9f, 0.1f); | |
final AnimationSet set = new AnimationSet(true); | |
set.addAnimation(scale); | |
set.addAnimation(alpha); | |
set.setFillAfter(true); | |
set.setDuration(1500); | |
set.setAnimationListener(new AnimationListener() { | |
@Override | |
public void onAnimationEnd(final Animation animation) { | |
parentView.removeView(imgView); | |
}); | |
} | |
}); | |
imgView.setAnimation(animation); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment