I need a Realized Effect AnimatedVectorDrawableCompat.
vector_drawable_anim.xml
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/vector_drawable">
<target
android:name="star"
android:animation="@animator/star_anim"/>
</animated-vector>
vector_drawable.xml
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="500px"
android:height="500px"
android:viewportHeight="500"
android:viewportWidth="500">
<group
android:name="star_group"
android:scaleX="5.0"
android:scaleY="5.0">
<path
android:name="star"
android:pathData="M 50.0,90.0 L 82.9193546357,27.2774101308 L 12.5993502926,35.8158045183 Z"
android:strokeColor="@color/colorAccent"
android:strokeWidth="1"/>
</group>
</vector>
star_anim.xml
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:ordering="sequentially">
<objectAnimator
android:duration="1000"
android:propertyName="trimPathStart"
android:valueFrom="1"
android:valueTo="0"/>
<objectAnimator
android:duration="1000"
android:propertyName="trimPathEnd"
android:valueFrom="1"
android:valueTo="0"/>
</set>
But AnimatorSetcan not install repeatMode.
If I installed objectAnimator repeatMode, the second objectAnimatorone will not be displayed.
What should I do?

source
share