xml:
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android=" http://schemas.android.com/apk/res/android"
android:duration="2000"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:repeatMode="restart"
android:toDegrees="+359" >
</rotate>
<rotate xmlns:android=" http://schemas.android.com/apk/res/android"
android:duration="2000"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:repeatMode="restart"
android:toDegrees="+359" >
</rotate>
代码:
mAnim = AnimationUtils.loadAnimation(this, R.anim.video_prepare_rotate);
LinearInterpolator lir = new LinearInterpolator();
mAnim.setInterpolator(lir);
mVideoPrepareImg = (ImageView) findViewById(R.id.img_video_prepare);
mVideoPrepareImg.startAnimation(mAnim);