开发者

Resetting animation in Android without starting it

开发者 https://www.devze.com 2023-01-20 08:50 出处:网络
I have an AnimationDrawable that is running. How to stop开发者_运维问答 & reset it so that it does not start again until start() is called? Calling setVisible(true, true) resets it, but also immed

I have an AnimationDrawable that is running. How to stop开发者_运维问答 & reset it so that it does not start again until start() is called? Calling setVisible(true, true) resets it, but also immediately starts animation, and I'd like to avoid it.


If you only want the animation to occur once use:

android:repeatCount="0"

but if you're trying to animate and then not animate, you'll probably have to use 2 different animations. More information would be nice :D

0

精彩评论

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