简单记录O(∩_∩)O~

新建anim目录,并新建实现旋转的动画文件roraterepeat.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >

    <rotate
        android:duration="1000"
        android:fromDegrees="0"
        android:interpolator="@android:anim/linear_interpolator"
        android:pivotX="50%"
        android:pivotY="50%"
        android:repeatCount="-1"
        android:toDegrees="360" />

</set>

接下来是动画的应用:

    mAnimationView = (ImageView) findViewById(R.id.animation);
    mAnimation = AnimationUtils.loadAnimation(this, R.anim.rotaterepeat);
    mAnimationView.startAnimation(mAnimation);