How to make a smooth image rotation in Android?
I’m using a RotateAnimation to rotate an image that I’m using as a custom cyclical spinner in Android. Here’s my rotate_indefinitely.xml file, which I placed in res/anim/: <?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:repeatCount=”infinite” android:duration=”1200″ /> When I apply this to my ImageView using AndroidUtils.loadAnimation(), it works great! spinner.startAnimation( AnimationUtils.loadAnimation(activity, R.anim.rotate_indefinitely) ); … Read more