title: Rotation animation, slow it down
body: <p>I need to slow down an rotate animation over an imageview: it begin faster, then it should "decelerate" until end of animation (then rotation stop). I've write this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  &lt;rotate
      android:duration="100"
      android:fromDegrees="0"
      android:interpolator="@android:anim/cycle_interpolator"
      android:pivotX="50%"
      android:pivotY="50%"
      android:repeatCount="30"
      android:repeatMode="restart"
      android:toDegrees="360" /&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p>then add listener to animation:</p>
  
  <pre><code>Animation rotate = AnimationUtils
              .loadAnimation(activity, R.anim.rotate);
      ImageView logo = (ImageView) SplashScreen.activity
              .findViewById(R.id.logo);
  
  
      rotate.setAnimationListener(new AnimationListener() {
  
          @Override
          public void onAnimationStart(Animation animation) {
              // TODO Auto-generated method stub
  
          }
  
          @Override
          public void onAnimationEnd(Animation animation) {
              Intent intent = new Intent(SplashScreen.this,
                      LoginActivity.class);
              SplashScreen.this.startActivity(intent);
  
          }
  
          @Override
          public void onAnimationRepeat(Animation animation) {
              if(animation.getRepeatCount() == 5) {
                  animation.setDuration(200);
              } else if (animation.getRepeatCount() == 10) {
                  Log.i("ANIM", "10");
                  animation.setDuration(5000);
              } else if (animation.getRepeatCount() == 15) {
                  animation.setDuration(800);
              } else if (animation.getRepeatCount() == 20) {
                  animation.setDuration(1600);
              } else if (animation.getRepeatCount() == 25) {
                  animation.setDuration(2000);
              } 
  
          }
  
      });
  
      logo.setAnimation(rotate);
      logo.startAnimation(rotate);
  </code></pre>
  
  <p>but animation has always the same velocity (code never go into onAnimationRepeat). What's wrong?</p>