1、首先写动画animation1.xml的xml文件
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="-360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="55555"
android:fillAfter="true"
android:repeatCount="infinite"
android:interpolator="@android:anim/linear_interpolator">
</rotate>
2.在java文件中像下面这样调用即可
ImageView imageView = (ImageView)findViewById(R.id.picture);
Animation animation = AnimationUtils.loadAnimation(Mainactivity.this, R.anim.animation1);
imageView.startAnimation(animation);