我有一个图像被设置为在我的应用程序中旋转。 除了最新的冰淇淋三明治之外,该代码完美适用于所有Android版本。 图像仍然旋转,但不是从图像的中心轴旋转。 相反,它似乎从图像的左角(0,0)旋转。 有没有人有任何想法,为什么这不适用于冰淇淋三明治? 这是我的代码:
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));谢谢!
I have an image that is set to rotate in my application. The code works perfectly on all Android versions except for the latest Ice Cream Sandwich. The image still rotates, but it is not rotating from the center axis of the image. Instead, it seems to rotate from the left corner (0,0) of the image. Does anyone have any ideas as to why this does not 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));Thanks!
最满意答案
看来,这个问题的答案Android吐司通知太小冰淇淋三明治也解决了我的微调问题。
It seems that the answer to this question Android Toast notification is too small in Ice Cream Sandwich also solved my spinner problem.
更多推荐
发布评论