title: Loop AnimatorSet
body: <p>I have made an AnimatorSet of three ObjectAnimator which I want to repeat sequentally.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:ordering="sequentially"&gt;
  
      &lt;objectAnimator
          android:propertyName="rotation"
          android:duration="300"
          android:valueFrom="0"
          android:valueTo="5"
          android:valueType="floatType"/&gt;
  
      &lt;objectAnimator
          android:propertyName="rotation"
          android:duration="600"
          android:valueFrom="5"
          android:valueTo="-5"
          android:valueType="floatType"/&gt;
  
      &lt;objectAnimator
          android:propertyName="rotation"
          android:duration="300"
          android:valueFrom="-5"
          android:valueTo="0"
          android:valueType="floatType"/&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p>But if I set the CycleInterpolator to AnimatorSet because the Animators will start sequentally</p>
  
  <blockquote>
    <p>public void setInterpolator (TimeInterpolator interpolator)
    Added in API level 11</p>
    
    <p>Sets the TimeInterpolator for all current child animations of this AnimatorSet.</p>
  </blockquote>
  
  <p>So I tried looping by restarting AnimatorSet by setting a listener, but it stops for few milliseconds and the effect of restarting AnimatorSet is noticeable.</p>
  
  <pre><code>a.addListener(new AnimatorListenerAdapter() {
      @Override
      public void onAnimationEnd(Animator animation)
      {
          animation.start();
      }
  });
  </code></pre>
  
  <p>What can I do to loop it (except building a huge list of ObjectAnimators or writing my own animation using Thread and Handler)?</p>