Android animation does not repeat

后端 未结 23 1463
囚心锁ツ
囚心锁ツ 2020-11-27 14:01

I\'m trying to make simple animation that would repeat several times (or infinitely).
It seems that android:repeatCount does not work!
Here is my anim

23条回答
  •  一向
    一向 (楼主)
    2020-11-27 14:22

    you can try this code. In your code just add,

    firstAnimation.setRepeatCount(5);
    

    This will repeat the animation for a definite time

    firstAnimation.setRepeatCount(Animation.INFINITE);
    firstAnimation.setRepeatMode(Animation.INFINITE);
    

    This will repeat the animation indefinitely.

提交回复
热议问题