Repeat AnimatorSet

后端 未结 7 1593
被撕碎了的回忆
被撕碎了的回忆 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:19

    set it's child object animators' repeat mode and count;

    objectAnimator.setRepeatCount(ObjectAnimator.INFINITE);
    objectAnimator.setRepeatMode(ObjectAnimator.RESTART/REVERSE...);
    

    This won't be able to be stopped, or cancelled, however, due to yet another bug.

    clearly, I'm not a fan of the myriad ways in which you can animate things in Android, and have them all fail you in one way or the other. Hope this helps somebody else.

    0 讨论(0)
提交回复
热议问题