Image Rotate animation Looping not work on android
<p>I want to rotate imageview with continuously looping on android.my code rotate is working perfectly with out set repeat mode.if i set repeat mode repeat animation not working but, imageview statically rotate some angle and i want loop rotate animation any one can help me with greatly appreciated!</p>

<p>here's animation xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;rotate
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:fromDegrees="45"
  android:toDegrees="45"
  android:pivotX="50%"
  android:pivotY="50%"
  android:duration="100"
  android:startOffset="0"
/&gt;
</code></pre>

<p>here's my java class</p>

<pre><code>import android.app.Activity;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class AnimationActivity extends Activity {
    /** Called when the activity is first created. */
    ImageView my_image;
    AnimationListener listener;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        listener = new AnimationListener() {
            @Override public void onAnimationStart(Animation animation) {}
            @Override public void onAnimationRepeat(Animation animation) {}
            @Override
            public void onAnimationEnd(Animation animation) {
                System.out.println("End Animation!");
                //load_animations();
            }
        };

        my_image=(ImageView)findViewById(R.id.my_img);
        load_animations();



    }
    void load_animations()
    {
        new AnimationUtils();
        Animation rotation = AnimationUtils.loadAnimation(this, R.anim.rotation);
        rotation.setRepeatCount(-1);
        rotation.setRepeatMode(2);
        rotation.setAnimationListener(listener);
        my_image.startAnimation(rotation);
    }

}
</code></pre>

<p>Thanks in Advance!</p>
