开发者

Android -- How to destroy an object after its animation has stopped?

开发者 https://www.devze.com 2023-03-07 18:15 出处:网络
After an ImageView translates off开发者_StackOverflow社区 the screen via a TranslateAnimation object, I want to set the ImageView as null. So really my question is how does one know when an animation

After an ImageView translates off开发者_StackOverflow社区 the screen via a TranslateAnimation object, I want to set the ImageView as null. So really my question is how does one know when an animation has completed without resorting to polling to objects position or other variables?


Register an AnimationListener with the Animation, and listen for onAnimationEnd().

0

精彩评论

暂无评论...
验证码 换一张
取 消