|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<animated-vector |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" |
| 4 | + xmlns:aapt="http://schemas.android.com/aapt"> |
| 5 | + |
| 6 | + <aapt:attr name="android:drawable"> |
| 7 | + <vector |
| 8 | + android:width="24dp" |
| 9 | + android:height="24dp" |
| 10 | + android:viewportWidth="24" |
| 11 | + android:viewportHeight="24"> |
| 12 | + <group |
| 13 | + android:name="heart" |
| 14 | + android:pivotX="12" |
| 15 | + android:pivotY="12"> |
| 16 | + <path |
| 17 | + android:pathData="M12,21 L10.695,19.853406 C6.06,15.7771117 3,13.0871935 3,9.79564033 C3,7.10572207 5.1735,5 7.95,5 C9.516,5 11.019,5.70626703 12,6.81798365 C12.981,5.70626703 14.484,5 16.05,5 C18.8265,5 21,7.10572207 21,9.79564033 C21,13.0871935 17.94,15.7771117 13.305,19.853406 L12,21 L12,21 Z" |
| 18 | + android:fillColor="#555" /> |
| 19 | + </group> |
| 20 | + </vector> |
| 21 | + </aapt:attr> |
| 22 | + |
| 23 | + <target android:name="heart"> |
| 24 | + <aapt:attr name="android:animation"> |
| 25 | + <set android:interpolator="@android:interpolator/accelerate_quad"> |
| 26 | + <!-- beat 1 --> |
| 27 | + <objectAnimator |
| 28 | + android:propertyName="scaleX" |
| 29 | + android:valueFrom="1" |
| 30 | + android:valueTo="1.2" |
| 31 | + android:duration="100" /> |
| 32 | + <objectAnimator |
| 33 | + android:propertyName="scaleY" |
| 34 | + android:valueFrom="1" |
| 35 | + android:valueTo="1.2" |
| 36 | + android:duration="100" /> |
| 37 | + <objectAnimator |
| 38 | + android:propertyName="scaleX" |
| 39 | + android:valueFrom="1.2" |
| 40 | + android:valueTo="1" |
| 41 | + android:startOffset="100" |
| 42 | + android:duration="150" /> |
| 43 | + <objectAnimator |
| 44 | + android:propertyName="scaleY" |
| 45 | + android:valueFrom="1.2" |
| 46 | + android:valueTo="1" |
| 47 | + android:startOffset="100" |
| 48 | + android:duration="150" /> |
| 49 | + <!-- beat 2 --> |
| 50 | + <objectAnimator |
| 51 | + android:propertyName="scaleX" |
| 52 | + android:valueFrom="1" |
| 53 | + android:valueTo="1.2" |
| 54 | + android:startOffset="500" |
| 55 | + android:duration="100" /> |
| 56 | + <objectAnimator |
| 57 | + android:propertyName="scaleY" |
| 58 | + android:valueFrom="1" |
| 59 | + android:valueTo="1.2" |
| 60 | + android:startOffset="500" |
| 61 | + android:duration="100" /> |
| 62 | + <objectAnimator |
| 63 | + android:propertyName="scaleX" |
| 64 | + android:valueFrom="1.2" |
| 65 | + android:valueTo="1" |
| 66 | + android:startOffset="600" |
| 67 | + android:duration="150" /> |
| 68 | + <objectAnimator |
| 69 | + android:propertyName="scaleY" |
| 70 | + android:valueFrom="1.2" |
| 71 | + android:valueTo="1" |
| 72 | + android:startOffset="600" |
| 73 | + android:duration="150" /> |
| 74 | + <!-- beat 3 --> |
| 75 | + <objectAnimator |
| 76 | + android:propertyName="scaleX" |
| 77 | + android:valueFrom="1" |
| 78 | + android:valueTo="1.2" |
| 79 | + android:startOffset="850" |
| 80 | + android:duration="100" /> |
| 81 | + <objectAnimator |
| 82 | + android:propertyName="scaleY" |
| 83 | + android:valueFrom="1" |
| 84 | + android:valueTo="1.2" |
| 85 | + android:startOffset="850" |
| 86 | + android:duration="100" /> |
| 87 | + <objectAnimator |
| 88 | + android:propertyName="scaleX" |
| 89 | + android:valueFrom="1.2" |
| 90 | + android:valueTo="1" |
| 91 | + android:startOffset="950" |
| 92 | + android:duration="150" /> |
| 93 | + <objectAnimator |
| 94 | + android:propertyName="scaleY" |
| 95 | + android:valueFrom="1.2" |
| 96 | + android:valueTo="1" |
| 97 | + android:startOffset="950" |
| 98 | + android:duration="150" /> |
| 99 | + |
| 100 | + |
| 101 | + </set> |
| 102 | + </aapt:attr> |
| 103 | + </target> |
| 104 | + |
| 105 | +</animated-vector> |
0 commit comments