I stayed for several hours, I feel like giving up. How can I loop an AnimatorSet defined in xml?
<set xmlns:android="http://schemas.android.com/apk/res/android"> <objectAnimator /> <objectAnimator /> <objectAnimator /> <objectAnimator /> </set>
I tried several dozen combinations of startOffset , repeatCount and duration on the same objectAnimator s, but that is not the case.
I read about this promising workaround:
a.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { animation.start(); Log.i(); } });
but it just doesn't work: onAnimationEnd is called once, the animation is repeated, and then onAnimationEnd no longer called.
Other similar questions include incorrect answers (referring to the android.view.animation structure) or suggest defining a custom interpolator for a single objectAnimator , but this is not quite what I'm looking for. Thanks.
source share