Loop AnimatorSet
In desperate need of this feature too, turns out some one already have found the solution.
http://www.jefflinwood.com/2013/04/repeating-android-animations-with-animatorset/
All credit belongs to the original author.
mAnimationSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
mAnimationSet.start();
}
});
mAnimationSet.start();
A workaround for this particular case is creating an AnimatorSet with first item to rotate one half and the second to keep rotating
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:ordering="sequentially">
<objectAnimator
android:propertyName="rotation"
android:duration="150"
android:valueFrom="0"
android:valueTo="-5"
android:valueType="floatType"/>
<objectAnimator
android:propertyName="rotation"
android:duration="300"
android:valueFrom="-5"
android:valueTo="5"
android:repeatMode="reverse"
android:repeatCount="infinite"
android:valueType="floatType"/>
</set>