我有一个动画旋转 ImageButton。
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:duration="2000" />
</set>
它在用户单击它并运行 AsyncTask 时启动。现在,在 AsyncTask 到达 PostExecute 之后,它会突然跳转到其原始状态并停止。
我可以避免这种突然的跳跃并继续旋转直到它到达原来的位置然后让它停在那里吗?
我现在正在使用它来停止 PostExecute 的动画:
refresh.getAnimation().cancel();
谢谢!