I have an image that is set to rotate in my application. The code works great on all versions of Android except the latest Ice Cream Sandwich. The image still rotates, but it does not rotate from the center axis of the image. Instead, it rotates from the left corner (0,0) of the image. Anyone have any ideas as to why this doesn't work in Ice Cream Sandwich? Here is my code:
rotator.xml:
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1200"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:toDegrees="360" />
animation.java:
status.setImageResource(R.drawable.pending);
status.startAnimation(AnimationUtils.loadAnimation(_context, R.anim.rotator));
Thank!
source
share