GeezerVison is showing github.com — animated vector drawable update · java02014/Coder@df7cc42
File tree
Expand file treeCollapse file tree
Open diff view settings
java/com/coder/guoy/recyclerview/ui
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/AndroidManifest.xml +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
135 | 135 | <activity |
136 | 136 | android:name=".ui.PlayActivityTransitions" |
137 | 137 | android:screenOrientation="portrait"/> |
138 | | - <activity android:name=".ui.PlayAnimateVectorDrawables"> |
139 | | - </activity> |
| 138 | + <activity |
| 139 | + android:name=".ui.PlayAnimateVectorDrawables" |
| 140 | + android:screenOrientation="portrait"/> |
140 | 141 | </application> |
141 | 142 |
|
142 | 143 | </manifest> |
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/com/coder/guoy/recyclerview/ui/PlayAnimateVectorDrawables.java +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,6 +18,7 @@ protected void onCreate(Bundle savedInstanceState) { |
18 | 18 | bindingView.animatevectordrawable.textviewTitle.setText("Animate Vector Drawables|矢量图片动画"); |
19 | 19 | bindingView.animatevectordrawable.toolbarBack.setOnClickListener(this); |
20 | 20 | bindingView.imageSmile.setOnClickListener(this); |
| 21 | + bindingView.btnGiveheart.setOnClickListener(this); |
21 | 22 | } |
22 | 23 |
|
23 | 24 | @Override |
@@ -28,6 +29,11 @@ public void onClick(View v) { |
28 | 29 | break; |
29 | 30 | case R.id.image_smile: |
30 | 31 | ((Animatable) bindingView.imageSmile.getDrawable()).start(); |
| 32 | + break; |
| 33 | + case R.id.btn_giveheart: |
| 34 | + bindingView.imageHeart.setVisibility(View.VISIBLE); |
| 35 | + Animatable animatable = (Animatable) bindingView.imageHeart.getDrawable(); |
| 36 | + animatable.start(); |
31 | 37 | } |
32 | 38 | } |
33 | 39 | } |
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/res/animator/animator_eye_left.xml +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
5 | 5 | android:propertyName="pathData" |
6 | 6 | android:valueFrom="@string/path_left_eye_sad" |
7 | 7 | android:valueTo="@string/path_left_eye_happy" |
8 | | - android:valueType="pathType"/> |
| 8 | + android:valueType="pathType"> |
| 9 | +</objectAnimator> |
9 | 10 |
|
Collapse file
Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + |
| 4 | + <objectAnimator |
| 5 | + android:duration="1000" |
| 6 | + android:propertyName="trimPathEnd" |
| 7 | + android:valueFrom="0" |
| 8 | + android:valueTo="1" |
| 9 | + android:valueType="floatType"/> |
| 10 | + |
| 11 | + <set> |
| 12 | + |
| 13 | + <objectAnimator |
| 14 | + android:duration="1000" |
| 15 | + android:propertyName="trimPathEnd" |
| 16 | + android:valueFrom="0" |
| 17 | + android:valueTo="1" |
| 18 | + android:valueType="floatType"/> |
| 19 | + </set> |
| 20 | + |
| 21 | +</set> |
Collapse file
Copy file name to clipboard +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + android:duration="2000" |
| 4 | + android:interpolator="@android:anim/decelerate_interpolator" |
| 5 | + android:propertyName="trimPathEnd" |
| 6 | + android:valueFrom="0" |
| 7 | + android:valueTo="1" |
| 8 | + android:valueType="floatType"/> |
Collapse file
Copy file name to clipboard +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + android:duration="1000" |
| 4 | + android:propertyName="trimPathEnd" |
| 5 | + android:valueFrom="0" |
| 6 | + android:valueTo="1" |
| 7 | + android:valueType="floatType"/> |
Collapse file
Copy file name to clipboard +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + android:duration="1000" |
| 4 | + android:propertyName="pathData" |
| 5 | + android:valueFrom="@string/path_heart_ring1" |
| 6 | + android:valueTo="@string/path_heart_ring2" |
| 7 | + android:valueType="pathType"/> |
Collapse file
Copy file name to clipboard +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + android:duration="1000" |
| 4 | + android:propertyName="pathData" |
| 5 | + android:valueFrom="@string/path_heart_ring1" |
| 6 | + android:valueTo="@string/path_heart_ring3" |
| 7 | + android:valueType="pathType"/> |
Collapse file
Copy file name to clipboard +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + android:duration="1000" |
| 4 | + android:propertyName="rotation" |
| 5 | + android:valueFrom="0" |
| 6 | + android:valueTo="-45"/> |
Collapse file
Copy file name to clipboard +25Lines changed: 25 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + android:drawable="@drawable/vector_heart"> |
| 4 | + |
| 5 | + <target |
| 6 | + android:name="line1" |
| 7 | + android:animation="@animator/animator_heart_line"/> |
| 8 | + |
| 9 | +<!-- <target |
| 10 | + android:name="ring1" |
| 11 | + android:animation="@animator/animator_heart_ring"/> |
| 12 | +
|
| 13 | + <target |
| 14 | + android:name="ring2" |
| 15 | + android:animation="@animator/animator_heart_ring"/>--> |
| 16 | + |
| 17 | +<!-- <target |
| 18 | + android:name="ring1" |
| 19 | + android:animation="@animator/animator_heart_ring2"/> |
| 20 | +
|
| 21 | + <target |
| 22 | + android:name="ring2" |
| 23 | + android:animation="@animator/animator_heart_ring3"/>--> |
| 24 | + |
| 25 | +</animated-vector> |