草庐IT

clearAnimation

全部标签

android - android 中的 clearAnimation() 和 stop() 有什么区别?

当我完成我的Activity时,我应该对任何剩余的AnimationDrawable对象使用clearAnimation()还是stop()? 最佳答案 stop()停止动画,仅此而已。由于stop()是AnimationDrawable.class的方法,您可以在想要停止AnimationDrawable的动画时使用它,但不能在任何View上使用。clearAnimation()是View.class的方法。它将停止View的动画,另外:如果定义了AnimationListener,将调用AnimationListener.onA