-----------------------java实现代码-------------------------

private Animation mRotate;

mRotate = AnimationUtils.loadAnimation(Auth.this, R.anim.rotate);
mIcon.startAnimation(mRotate);

------------------------layout的View-------------------------------

<ImageView
android:id="@+id/auth_loading_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/sso_load_icon"/>

-----------------------anim/rotate.XML样式--------------

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1500"
android:fromDegrees="0.0"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50.0%"
android:pivotY="50.0%"
android:startOffset="0"
android:toDegrees="360.0"
android:repeatMode="restart"
android:repeatCount="infinite"/>