我正在使用一个带有多个视图的recyclerView,其中之一是动画视图,该视图应用了一个动画。一旦视图离开屏幕,即使动画仍然存在,动画也不再起作用。
数据:
rotate_around_center_point.xml
应用动画:
数据:
rotate_around_center_point.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" >
<rotate
android:duration="2500"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:repeatMode="restart"
android:toDegrees="360" />
</set>
应用动画:
animation = AnimationUtils.loadAnimation(this.getContext(),
R.anim.rotate_around_center_point);
loadingRotatingCircleIV.startAnimation(animation);
我找不到任何方法来捕获动画被中断的事件,以便在动画离开屏幕后能够重新启动它。