GeezerVison is showing github.com — animated update · AndroidLu/Coder@630548f
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/java/com/coder/guoy/recyclerview/ui/PlayAnimateVectorDrawables.java +10Lines changed: 10 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
10 | 10 | import com.coder.guoy.recyclerview.R; |
11 | 11 | import com.coder.guoy.recyclerview.base.MvvmBaseActivity; |
12 | 12 | import com.coder.guoy.recyclerview.databinding.ActivityPlayAnimateVectorDrawablesBinding; |
| 13 | +import com.coder.guoy.recyclerview.utils.ToastUtil; |
13 | 14 |
|
14 | 15 | /** |
15 | 16 | * @Version:v1.0 |
@@ -30,6 +31,8 @@ protected void onCreate(Bundle savedInstanceState) { |
30 | 31 | bindingView.btnSuprise.setOnClickListener(this); |
31 | 32 | bindingView.imageSmile.setOnClickListener(this); |
32 | 33 | bindingView.imageRedheart.setOnClickListener(this); |
| 34 | + bindingView.imageMoto.setOnClickListener(this); |
| 35 | + bindingView.imageRotate.setOnClickListener(this); |
33 | 36 | } |
34 | 37 |
|
35 | 38 | @Override |
@@ -54,6 +57,13 @@ public void onClick(View v) { |
54 | 57 | VectorDrawableClick(R.drawable.animated_red_heartfull, R.drawable.animated_red_heartempty, |
55 | 58 | bindingView.imageRedheart); |
56 | 59 | break; |
| 60 | + case R.id.image_moto: |
| 61 | + ((AnimatedVectorDrawable) bindingView.imageMoto.getDrawable()).start(); |
| 62 | + break; |
| 63 | + case R.id.image_rotate: |
| 64 | + ToastUtil.show("rotate"); |
| 65 | + ((AnimatedVectorDrawable) bindingView.imageRotate.getDrawable()).start(); |
| 66 | + break; |
57 | 67 | } |
58 | 68 | } |
59 | 69 |
|
|
Collapse file
Copy file name to clipboard +10-8Lines changed: 10 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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:interpolator="@android:anim/accelerate_interpolator" |
5 | | - android:propertyName="pathData" |
6 | | - android:valueFrom="@string/path_left_eye_sad" |
7 | | - android:valueTo="@string/path_left_eye_happy" |
8 | | - android:valueType="pathType"> |
9 | | -</objectAnimator> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:interpolator="@android:anim/accelerate_interpolator" |
| 6 | + android:propertyName="pathData" |
| 7 | + android:valueFrom="@string/path_left_eye_sad" |
| 8 | + android:valueTo="@string/path_left_eye_happy" |
| 9 | + android:valueType="pathType"> |
| 10 | + </objectAnimator> |
| 11 | +</set> |
Collapse file
Copy file name to clipboard +10-8Lines changed: 10 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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:interpolator="@android:anim/accelerate_interpolator" |
5 | | - android:propertyName="pathData" |
6 | | - android:valueTo="@string/path_left_eye_sad" |
7 | | - android:valueFrom="@string/path_left_eye_happy" |
8 | | - android:valueType="pathType"> |
9 | | -</objectAnimator> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:interpolator="@android:anim/accelerate_interpolator" |
| 6 | + android:propertyName="pathData" |
| 7 | + android:valueFrom="@string/path_left_eye_happy" |
| 8 | + android:valueTo="@string/path_left_eye_sad" |
| 9 | + android:valueType="pathType"> |
| 10 | + </objectAnimator> |
| 11 | +</set> |
Collapse file
Copy file name to clipboard +9-7Lines changed: 9 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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:interpolator="@android:anim/accelerate_interpolator" |
5 | | - android:propertyName="pathData" |
6 | | - android:valueFrom="@string/path_right_eye_sad" |
7 | | - android:valueTo="@string/path_right_eye_happy" |
8 | | - android:valueType="pathType"/> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:interpolator="@android:anim/accelerate_interpolator" |
| 6 | + android:propertyName="pathData" |
| 7 | + android:valueFrom="@string/path_right_eye_sad" |
| 8 | + android:valueTo="@string/path_right_eye_happy" |
| 9 | + android:valueType="pathType"/> |
| 10 | +</set> |
9 | 11 |
|
Collapse file
Copy file name to clipboard +9-7Lines changed: 9 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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:interpolator="@android:anim/accelerate_interpolator" |
5 | | - android:propertyName="pathData" |
6 | | - android:valueTo="@string/path_right_eye_sad" |
7 | | - android:valueFrom="@string/path_right_eye_happy" |
8 | | - android:valueType="pathType"/> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:interpolator="@android:anim/accelerate_interpolator" |
| 6 | + android:propertyName="pathData" |
| 7 | + android:valueFrom="@string/path_right_eye_happy" |
| 8 | + android:valueTo="@string/path_right_eye_sad" |
| 9 | + android:valueType="pathType"/> |
| 10 | +</set> |
9 | 11 |
|
Collapse file
Copy file name to clipboard +9-7Lines changed: 9 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" |
3 | | - android:duration="3000" |
4 | | - android:interpolator="@android:anim/decelerate_interpolator" |
5 | | - android:propertyName="trimPathEnd" |
6 | | - android:valueFrom="0" |
7 | | - android:valueTo="1" |
8 | | - android:valueType="floatType"/> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="3000" |
| 5 | + android:interpolator="@android:anim/decelerate_interpolator" |
| 6 | + android:propertyName="trimPathEnd" |
| 7 | + android:valueFrom="0" |
| 8 | + android:valueTo="1" |
| 9 | + android:valueType="floatType"/> |
| 10 | +</set> |
Collapse file
Copy file name to clipboard +11Lines changed: 11 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 | + <objectAnimator |
| 4 | + android:duration="300" |
| 5 | + android:propertyName="fillColor" |
| 6 | + android:repeatCount="infinite" |
| 7 | + android:repeatMode="reverse" |
| 8 | + android:valueFrom="#FF000000" |
| 9 | + android:valueTo="@color/red" |
| 10 | + android:valueType="colorType"/> |
| 11 | +</set> |
Collapse file
Copy file name to clipboard +9-8Lines changed: 9 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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:interpolator="@android:anim/accelerate_interpolator" |
5 | | - android:propertyName="pathData" |
6 | | - android:valueFrom="@string/path_face_mouth_sad" |
7 | | - android:valueTo="@string/path_face_mouth_happy" |
8 | | - android:valueType="pathType"/> |
9 | | - |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:interpolator="@android:anim/accelerate_interpolator" |
| 6 | + android:propertyName="pathData" |
| 7 | + android:valueFrom="@string/path_face_mouth_sad" |
| 8 | + android:valueTo="@string/path_face_mouth_happy" |
| 9 | + android:valueType="pathType"/> |
| 10 | +</set> |
Collapse file
Copy file name to clipboard +9-8Lines changed: 9 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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:interpolator="@android:anim/accelerate_interpolator" |
5 | | - android:propertyName="pathData" |
6 | | - android:valueFrom="@string/path_face_mouth_happy" |
7 | | - android:valueTo="@string/path_face_mouth_sad" |
8 | | - android:valueType="pathType"/> |
9 | | - |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:interpolator="@android:anim/accelerate_interpolator" |
| 6 | + android:propertyName="pathData" |
| 7 | + android:valueFrom="@string/path_face_mouth_happy" |
| 8 | + android:valueTo="@string/path_face_mouth_sad" |
| 9 | + android:valueType="pathType"/> |
| 10 | +</set> |
Collapse file
Copy file name to clipboard +8-6Lines changed: 8 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 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="fillColor" |
5 | | - android:valueFrom="@color/red" |
6 | | - android:valueTo="@color/colorWrite" |
7 | | - android:valueType="colorType"/> |
| 2 | +<set xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + <objectAnimator |
| 4 | + android:duration="1000" |
| 5 | + android:propertyName="fillColor" |
| 6 | + android:valueFrom="@color/red" |
| 7 | + android:valueTo="@color/colorWrite" |
| 8 | + android:valueType="colorType"/> |
| 9 | +</set> |