Last active
November 15, 2020 18:00
-
-
Save Nyame123/10711e6a7436bb0f22676bae187660d3 to your computer and use it in GitHub Desktop.
creating 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
<animated-vector | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:aapt="http://schemas.android.com/aapt"> | |
<aapt:attr name="android:drawable"> | |
<vector | |
android:name="vector" | |
android:width="84dp" | |
android:height="84dp" | |
android:viewportWidth="24" | |
android:viewportHeight="24"> | |
<path | |
android:name="path" | |
android:pathData="M 20 11 L 7.83 11 L 13.42 5.41 L 12 4 L 4 12 L 12 20 L 13.41 18.59 L 7.83 13 L 20 13 L 20 11 Z" | |
android:fillColor="#000000"/> | |
</vector> | |
</aapt:attr> | |
<target android:name="path"> | |
<aapt:attr name="android:animation"> | |
<objectAnimator | |
android:propertyName="pathData" | |
android:duration="350" | |
android:valueFrom="M 20 11 L 13.915 11 L 7.83 11 L 13.42 5.41 L 12 4 L 4 12 L 12 20 L 13.41 18.59 L 7.83 13 L 13.915 13 L 20 13 L 20 11 L 20 11" | |
android:valueTo="M 19 6.41 L 13.41 12 L 19 17.59 L 17.59 19 L 12 13.41 L 6.41 19 L 5 17.59 L 10.59 12 L 5 6.41 L 6.41 5 L 12 10.59 L 17.59 5 L 19 6.41" | |
android:valueType="pathType"/> | |
</aapt:attr> | |
</target> | |
</animated-vector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment