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 · CoderGuoy/Coder@5c8e798

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main
    • java/com/coder/guoy/recyclerview/ui
      • PlayAnimateVectorDrawables.java
    • res
      • animator
        • animator_eye_left.xml
        • animator_heart.xml
        • animator_heart_ring.xml
        • animator_heart_ring2.xml
        • animator_heart_ring3.xml
        • animator_red_heart_color.xml
      • drawable
        • animated_heart.xml
        • animated_red_heart.xml
        • vector_heart.xml
        • vector_heart1.xml
        • vector_red_heart.xml
        • vector_smile.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/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
+13-4Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.coder.guoy.recyclerview.ui;
22

3-
import android.animation.ObjectAnimator;
43
import android.graphics.drawable.Animatable;
54
import android.os.Bundle;
65
import android.view.View;
@@ -9,7 +8,14 @@
98
import com.coder.guoy.recyclerview.base.MvvmBaseActivity;
109
import com.coder.guoy.recyclerview.databinding.ActivityPlayAnimateVectorDrawablesBinding;
1110

11+
/**
12+
* @Version:v1.0
13+
* @Author:Guoy
14+
* @CreateTime:2017年6月21日
15+
* @Descrpiton:AnimateVectorDrawables|矢量图片动画
16+
*/
1217
public class PlayAnimateVectorDrawables extends MvvmBaseActivity<ActivityPlayAnimateVectorDrawablesBinding> implements View.OnClickListener {
18+
private boolean isFirst = true;
1319

1420
@Override
1521
protected void onCreate(Bundle savedInstanceState) {
@@ -20,6 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
2026
bindingView.animatevectordrawable.toolbarBack.setOnClickListener(this);
2127
bindingView.imageSmile.setOnClickListener(this);
2228
bindingView.btnGiveheart.setOnClickListener(this);
29+
bindingView.imageRedheart.setOnClickListener(this);
2330
}
2431

2532
@Override
@@ -28,15 +35,17 @@ public void onClick(View v) {
2835
case R.id.toolbar_back:
2936
finish();
3037
break;
31-
case R.id.image_smile:
38+
case R.id.image_smile://笑脸
3239
((Animatable) bindingView.imageSmile.getDrawable()).start();
3340
break;
41+
case R.id.image_redheart://红心
42+
((Animatable) bindingView.imageRedheart.getDrawable()).start();
43+
break;
3444
case R.id.btn_giveheart:
3545
bindingView.imageHeart.setVisibility(View.VISIBLE);
3646
Animatable animatable = (Animatable) bindingView.imageHeart.getDrawable();
3747
animatable.start();
38-
ObjectAnimator rotation = ObjectAnimator.ofFloat(bindingView.imageHeart, "rotation", 0, -45);
39-
rotation.start();
48+
break;
4049
}
4150
}
4251
}
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
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
android:valueFrom="@string/path_left_eye_sad"
77
android:valueTo="@string/path_left_eye_happy"
88
android:valueType="pathType">
9-
</objectAnimator>
10-
9+
</objectAnimator>
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/animator/animator_heart.xml
-21Lines changed: 0 additions & 21 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/animator/animator_heart_ring.xml
-7Lines changed: 0 additions & 7 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/animator/animator_heart_ring2.xml
-7Lines changed: 0 additions & 7 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/animator/animator_heart_ring3.xml
-7Lines changed: 0 additions & 7 deletions
This file was deleted.
Collapse file

‎app/src/main/res/animator/animator_red_heart_color.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="fillColor"
5+
android:valueFrom="@color/colorWrite"
6+
android:valueTo="@color/red"
7+
android:valueType="colorType"/>
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/drawable/animated_heart.xml
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,4 @@
66
android:name="line1"
77
android:animation="@animator/animator_heart_line"/>
88

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-
259
</animated-vector>
Collapse file

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

Copy file name to clipboard
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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_red_heart">
4+
5+
<target
6+
android:name="red_heart"
7+
android:animation="@animator/animator_red_heart_color"/>
8+
9+
</animated-vector>
Collapse file

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

Copy file name to clipboard
+5-22Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:width="300dp"
4-
android:height="300dp"
5-
android:viewportHeight="150"
6-
android:viewportWidth="150">
3+
android:width="200dp"
4+
android:height="200dp"
5+
android:viewportHeight="100"
6+
android:viewportWidth="100">
77
<path
88
android:name="line1"
9-
android:pathData="M 40,40
10-
L 40,90 L 90,90 L 90,65
11-
A 25,25 0,1,1,40,65 A 25,25 0,0,1,90,65
12-
L 90,40 L 40,40
13-
A 25,25 0,0,1,90,40
14-
A 25,25 0,0,1,90,90"
9+
android:pathData="@string/path_heart_lin1"
1510
android:strokeColor="@color/colorTabText"
1611
android:strokeLineCap="round"
1712
android:strokeWidth="1"/>
18-
<!-- <path
19-
android:name="ring1"
20-
android:pathData="@string/path_heart_ring1"
21-
android:strokeColor="@color/colorTabText"
22-
android:strokeLineCap="round"
23-
android:strokeWidth="1"/>
24-
<path
25-
android:name="ring2"
26-
android:pathData="@string/path_heart_ring1"
27-
android:strokeColor="@color/colorTabText"
28-
android:strokeLineCap="round"
29-
android:strokeWidth="1"/>-->
3013
</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.