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 update · AndroidLu/Coder@9284746

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_heart_line.xml
        • animator_refresh_rote.xml
      • drawable
        • animated_refresh_rote.xml
        • vector_autorenew_black_24dp.xml
        • vector_toys_24dp.xml
      • layout
        • activity_play_animate_vector_drawables.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
+5-7Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.coder.guoy.recyclerview.R;
1111
import com.coder.guoy.recyclerview.base.MvvmBaseActivity;
1212
import com.coder.guoy.recyclerview.databinding.ActivityPlayAnimateVectorDrawablesBinding;
13-
import com.coder.guoy.recyclerview.utils.ToastUtil;
1413

1514
/**
1615
* @Version:v1.0
@@ -31,8 +30,8 @@ protected void onCreate(Bundle savedInstanceState) {
3130
bindingView.btnSuprise.setOnClickListener(this);
3231
bindingView.imageSmile.setOnClickListener(this);
3332
bindingView.imageRedheart.setOnClickListener(this);
34-
bindingView.imageMoto.setOnClickListener(this);
3533
bindingView.imageRotate.setOnClickListener(this);
34+
bindingView.imageMoto.setOnClickListener(this);
3635
}
3736

3837
@Override
@@ -57,13 +56,12 @@ public void onClick(View v) {
5756
VectorDrawableClick(R.drawable.animated_red_heartfull, R.drawable.animated_red_heartempty,
5857
bindingView.imageRedheart);
5958
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");
59+
case R.id.image_rotate://旋转
6560
((AnimatedVectorDrawable) bindingView.imageRotate.getDrawable()).start();
6661
break;
62+
case R.id.image_moto://摩托车
63+
((AnimatedVectorDrawable) bindingView.imageMoto.getDrawable()).start();
64+
break;
6765
}
6866
}
6967

Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/animator/animator_heart_line.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<objectAnimator
44
android:duration="3000"
55
android:interpolator="@android:anim/decelerate_interpolator"
6-
android:propertyName="trimPathEnd"
6+
android:propertyName="trimPathStart"
77
android:valueFrom="0"
88
android:valueTo="1"
99
android:valueType="floatType"/>
Collapse file

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

Copy file name to clipboard
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<set xmlns:android="http://schemas.android.com/apk/res/android">
33
<objectAnimator
4-
android:duration="1000"
5-
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
4+
android:duration="2000"
5+
android:interpolator="@android:anim/linear_interpolator"
66
android:propertyName="rotation"
7+
android:repeatCount="infinite"
8+
android:repeatMode="restart"
79
android:valueFrom="0"
8-
android:valueTo="360"
9-
android:valueType="floatType"/>
10-
10+
android:valueTo="-360"/>
1111
</set>
Collapse file

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

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:drawable="@drawable/vector_autorenew_black_24dp">
3+
android:drawable="@drawable/vector_toys_24dp">
44

55
<target
6-
android:name="rotate"
6+
android:name="rotation"
77
android:animation="@animator/animator_refresh_rote"/>
88

99
</animated-vector>
Collapse file

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

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

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

Copy file name to clipboard
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<group
7+
android:name="rotation"
8+
android:pivotX="12"
9+
android:pivotY="12">
10+
<path
11+
android:fillColor="@color/red"
12+
android:pathData="M12,12 c0,-3 2.5,-5.5 5.5,-5.5 S23,9 23,12L12,12z"/>
13+
<path
14+
android:fillColor="@color/green"
15+
android:pathData="M12,12 c0,3 -2.5,5.5 -5.5,5.5S1,15 1,12h11z"/>
16+
<path
17+
android:fillColor="@color/blue"
18+
android:pathData="M12,12c-3,0 -5.5,-2.5 -5.5,-5.5S9,1 12,1v11z"/>
19+
<path
20+
android:fillColor="@color/yello"
21+
android:pathData="M12,12c3,0 5.5,2.5 5.5,5.5S15,23 12,23L12,12z"/>
22+
</group>
23+
</vector>
Collapse file

‎app/src/main/res/layout/activity_play_animate_vector_drawables.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/layout/activity_play_animate_vector_drawables.xml
+38-6Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
android:layout_height="wrap_content"
3030
android:text="点我有惊喜^_^"/>
3131

32+
<TextView
33+
android:layout_width="match_parent"
34+
android:layout_height="wrap_content"
35+
android:gravity="center"
36+
android:text="trimPathEnd"
37+
android:textSize="18sp"/>
38+
3239
<ImageView
3340
android:id="@+id/image_bonc"
3441
android:layout_width="wrap_content"
@@ -37,14 +44,26 @@
3744
android:src="@drawable/animated_bonc"
3845
android:visibility="invisible"/>
3946

47+
<TextView
48+
android:layout_width="match_parent"
49+
android:layout_height="wrap_content"
50+
android:gravity="center"
51+
android:text="trimPathStart"
52+
android:textSize="18sp"/>
53+
4054
<ImageView
4155
android:id="@+id/image_heart"
4256
android:layout_width="wrap_content"
4357
android:layout_height="wrap_content"
4458
android:layout_gravity="center"
45-
android:src="@drawable/animated_heart"
46-
android:visibility="invisible"/>
59+
android:src="@drawable/animated_heart"/>
4760

61+
<TextView
62+
android:layout_width="match_parent"
63+
android:layout_height="wrap_content"
64+
android:gravity="center"
65+
android:text="pathData形状变化"
66+
android:textSize="18sp"/>
4867

4968
<ImageView
5069
android:id="@+id/image_smile"
@@ -53,27 +72,40 @@
5372
android:layout_gravity="center"
5473
android:src="@drawable/animated_to_smile"/>
5574

75+
<TextView
76+
android:layout_width="match_parent"
77+
android:layout_height="wrap_content"
78+
android:gravity="center"
79+
android:text="fillColor颜色变化"
80+
android:textSize="18sp"/>
81+
5682
<ImageView
5783
android:id="@+id/image_redheart"
5884
android:layout_width="wrap_content"
5985
android:layout_height="wrap_content"
6086
android:layout_gravity="center"
6187
android:src="@drawable/animated_red_heartfull"/>
6288

89+
<TextView
90+
android:layout_width="match_parent"
91+
android:layout_height="wrap_content"
92+
android:gravity="center"
93+
android:text="rotation旋转动画"
94+
android:textSize="18sp"/>
6395

6496
<ImageView
65-
android:id="@+id/image_moto"
97+
android:id="@+id/image_rotate"
6698
android:layout_width="200dp"
6799
android:layout_height="200dp"
68100
android:layout_gravity="center"
69-
android:src="@drawable/animated_motorcycle_show"/>
101+
android:src="@drawable/animated_refresh_rote"/>
70102

71103
<ImageView
72-
android:id="@+id/image_rotate"
104+
android:id="@+id/image_moto"
73105
android:layout_width="200dp"
74106
android:layout_height="200dp"
75107
android:layout_gravity="center"
76-
android:src="@drawable/animated_refresh_rote"/>
108+
android:src="@drawable/animated_motorcycle_show"/>
77109

78110
</LinearLayout>
79111
</android.support.v4.widget.NestedScrollView>

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.