vanlooverenkoen
vanlooverenkoen

Reputation: 2301

Animated Vector drawable: Animate from "round" strokeLineCap to "butt" strokeLineCap

Is there a way to animate a vector drawable from a "round" strokeLineCap to a "butt" strokeLineCap?

This is what I have tried: but all of these have crashed my app

<objectAnimator
    android:propertyName="strokeLineCap"
    android:valueFrom="2"
    android:valueTo="0"
    android:valueType="floatType"
    android:duration="500"
    android:interpolator="@android:interpolator/fast_out_slow_in" />

and

<objectAnimator
    android:propertyName="strokeLineCap"
    android:valueFrom="square"
    android:valueTo="butt"
    android:valueType="stringType"
    android:duration="500"
    android:interpolator="@android:interpolator/fast_out_slow_in" />

and

<objectAnimator
    android:propertyName="strokeLineCap"
    android:valueFrom="2"
    android:valueTo="0"
    android:valueType="intType"
    android:duration="500"
    android:interpolator="@android:interpolator/fast_out_slow_in" />

I want to change Nick Butcher his fingerprint animation from a round strokeLineCap for the fingerprint to a "butt" strokeLineCap for the Cross and Checkmark

https://gist.github.com/nickbutcher/29244da0ee9914001e09#gistcomment-2304377

Upvotes: 2

Views: 392

Answers (0)

Related Questions