I use the following code to rotate an image
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> <rotate android:fromDegrees="0" android:toDegrees="360" android:duration="500" android:repeatCount="infinite" android:pivotX="50%" android:pivotY="50%" > </rotate> </set>
Animation rotate1 = AnimationUtils.loadAnimation (this, R.anim.rotate_picture); rotate.startAnimation (rotate1);
The layout I use is
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/loader" android:layout_centerInParent="true" android:id="@+id/rotate" /> </RelativeLayout>
But this is a 500 ms stop and restart again. But I need to constantly rotate the image. No stop in the middle. How can i do this.
source share