GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — animated vector drawable update · java02014/Coder@df7cc42

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main
    • AndroidManifest.xml
    • java/com/coder/guoy/recyclerview/ui
      • PlayAnimateVectorDrawables.java
    • res
      • animator
        • animator_eye_left.xml
        • animator_heart.xml
        • animator_heart_line.xml
        • animator_heart_ring.xml
        • animator_heart_ring2.xml
        • animator_heart_ring3.xml
        • animator_heart_rotate.xml
      • drawable
        • animated_heart.xml
        • vector_heart.xml
        • vector_heart1.xml
      • layout
        • activity_play_animate_vector_drawables.xml
      • values
        • strings.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/src/main/AndroidManifest.xml‎

Copy file name to clipboardExpand all lines: app/src/main/AndroidManifest.xml
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@
135135
<activity
136136
android:name=".ui.PlayActivityTransitions"
137137
android:screenOrientation="portrait"/>
138-
<activity android:name=".ui.PlayAnimateVectorDrawables">
139-
</activity>
138+
<activity
139+
android:name=".ui.PlayAnimateVectorDrawables"
140+
android:screenOrientation="portrait"/>
140141
</application>
141142

142143
</manifest>
Collapse file

‎app/src/main/java/com/coder/guoy/recyclerview/ui/PlayAnimateVectorDrawables.java‎

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 numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ protected void onCreate(Bundle savedInstanceState) {
1818
bindingView.animatevectordrawable.textviewTitle.setText("Animate Vector Drawables|矢量图片动画");
1919
bindingView.animatevectordrawable.toolbarBack.setOnClickListener(this);
2020
bindingView.imageSmile.setOnClickListener(this);
21+
bindingView.btnGiveheart.setOnClickListener(this);
2122
}
2223

2324
@Override
@@ -28,6 +29,11 @@ public void onClick(View v) {
2829
break;
2930
case R.id.image_smile:
3031
((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();
3137
}
3238
}
3339
}
Collapse file

‎app/src/main/res/animator/animator_eye_left.xml‎

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 numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
android:propertyName="pathData"
66
android:valueFrom="@string/path_left_eye_sad"
77
android:valueTo="@string/path_left_eye_happy"
8-
android:valueType="pathType"/>
8+
android:valueType="pathType">
9+
</objectAnimator>
910

Collapse file

‎app/src/main/res/animator/animator_heart.xml‎

Copy file name to clipboard
+21Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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

‎app/src/main/res/animator/animator_heart_line.xml‎

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

‎app/src/main/res/animator/animator_heart_ring.xml‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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

‎app/src/main/res/animator/animator_heart_ring2.xml‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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

‎app/src/main/res/animator/animator_heart_ring3.xml‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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

‎app/src/main/res/animator/animator_heart_rotate.xml‎

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

‎app/src/main/res/drawable/animated_heart.xml‎

Copy file name to clipboard
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.