Is there a simple way to repeat a Android AnimatorSet
(infinite)? Can I set a AnimationListener
and restart the AnimatorSet
by calling start()
again?
My AnimatorSet
contains two animations that are played sequentially.
So if I set the repeat mode of both single animation to repeat, than the first will be repeated while the second runs, right?
How about this?
set it's child object animators' repeat mode and count;
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.
There is an answer for the first two questions
Yes, there is:
The answer for the third question, is no. The first animation will be repeated and after all repetitions the succeeding animation will be started.
Set Infinite repeat count and restart / reverse repeat mode to all child animations
So, none of the above options are appropriate.
If you use:
you will end up getting stackOverFlow exception sometimes.
The best thing is to do something like:
No, you can't repeat AnimatorSet, you can only repeat of a single ObjectAnimator/ ValueAnimator
But you can use PropertyValuesHolder, so that you can make an ObjectAnimator from a set of PropertyValuesHolder
here's example