Last active
November 5, 2020 18:24
-
-
Save derysudrajat/f7e401fee5bb499a18eaade07c49e3f8 to your computer and use it in GitHub Desktop.
Animated Vector Drawable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="800" | |
android:interpolator="@android:anim/overshoot_interpolator"> | |
<scale | |
android:fromXScale="1.3" | |
android:fromYScale="1.3" | |
android:pivotX="50%" | |
android:pivotY="50%" | |
android:toXScale="1.0" | |
android:toYScale="1.0" /> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:aapt="http://schemas.android.com/aapt" | |
xmlns:tools="http://schemas.android.com/tools" | |
tools:targetApi="lollipop"> | |
<aapt:attr name="android:drawable"> | |
<vector | |
android:name="vector" | |
android:width="416dp" | |
android:height="400dp" | |
android:viewportWidth="416" | |
android:viewportHeight="400"> | |
<group | |
android:name="group" | |
android:pivotX="215" | |
android:pivotY="215"> | |
<path | |
android:name="path" | |
android:fillColor="#fff" | |
android:pathData="M 304 0 L 303 0 C 263.3 0 228.2 21 208 52 C 187.8 21 152.7 0 113 0 L 112 0 C 82.22 0.279 53.724 12.313 32.76 33.465 C 11.795 54.617 0.014 83.219 0 113 C 0 150 16.2 202.5 47.8 245.7 C 108 328 208 400 208 400 C 208 400 308 328 368.2 245.7 C 399.8 202.5 416 150 416 113 C 415.986 83.219 404.205 54.617 383.24 33.465 C 362.276 12.313 333.78 0.279 304 0 Z" | |
android:strokeWidth="1" /> | |
</group> | |
</vector> | |
</aapt:attr> | |
<target android:name="group"> | |
<aapt:attr name="android:animation"> | |
<set> | |
<objectAnimator | |
android:duration="400" | |
android:interpolator="@android:anim/overshoot_interpolator" | |
android:propertyName="scaleX" | |
android:valueFrom="0" | |
android:valueTo="0.85" | |
android:valueType="floatType" /> | |
<objectAnimator | |
android:duration="400" | |
android:interpolator="@android:anim/overshoot_interpolator" | |
android:propertyName="scaleY" | |
android:valueFrom="0" | |
android:valueTo="0.85" | |
android:valueType="floatType" /> | |
<objectAnimator | |
android:duration="200" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
android:propertyName="scaleX" | |
android:startOffset="600" | |
android:valueFrom="0.85" | |
android:valueTo="0" | |
android:valueType="floatType" /> | |
<objectAnimator | |
android:duration="200" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
android:propertyName="scaleY" | |
android:startOffset="600" | |
android:valueFrom="0.85" | |
android:valueTo="0" | |
android:valueType="floatType" /> | |
</set> | |
</aapt:attr> | |
</target> | |
<target android:name="path"> | |
<aapt:attr name="android:animation"> | |
<set> | |
<objectAnimator | |
android:duration="50" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
android:propertyName="fillAlpha" | |
android:valueFrom="0" | |
android:valueTo="1" | |
android:valueType="floatType" /> | |
<objectAnimator | |
android:duration="50" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
android:propertyName="fillAlpha" | |
android:startOffset="750" | |
android:valueFrom="1" | |
android:valueTo="0" | |
android:valueType="floatType" /> | |
</set> | |
</aapt:attr> | |
</target> | |
</animated-vector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment