Repeat AnimatorSet

后端 未结 7 1592
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 09:19

Is there a simple way to repeat a Android AnimatorSet (infinite)? Can I set a AnimationListener and restart the AnimatorSet by calling

7条回答
  •  走了就别回头了
    2021-02-05 10:10

    Out of my head - animation framework is source of pain, especially if you want to support 2.x. I usually had problems with sets trying to do anythig more complexKeep track of with AnimationListener kind-of "player". I keep track on which animation I play (like int etc) and then on onAnimationEnd I start another that should be in sequence. That way I can easily "script" my sequence, and do not bother broken framework.

提交回复
热议问题