简体   繁体   English

在Android中重复动画

[英]Repeating animation in Android

I have defined six animations like a1 , a2 , a3 , a4 , a5 and a6 for six image views. 我为六个图像视图定义了六个动画,如a1a2a3a4a5a6 These animations are performed in a sequence. 这些动画是按顺序执行的。 For instance, a2 will start when a1 ends, a3 will start when a2 ends and so on. 例如, a2将在a1结束时开始, a3将在a2结束时开始,依此类推。 Starting from a1 , the animation ends with a6 . a1开始,动画以a6结尾。 Now I want to repeat again from a1 to a6 . 现在我想从a1再次重复到a6 Where should I write this setRepeatMode ? 我应该在哪里写这个setRepeatMode How to achieve this in some other way? 如何以其他方式实现这一目标? Please help. 请帮忙。

You could set a AnimationListener on your a6 animation and have it restart everything? 您可以在a6动画上设置AnimationListener ,然后重新启动所有内容?

In fact for your chain of animations, the usage of AnimationListener might be helpful. 实际上,对于您的动画链,使用AnimationListener可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM