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 — ShareElement add · AndroidLu/Coder@ff78e65

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main
    • java/com/coder/guoy/recyclerview/ui
      • PlayActivityTransitions.java
      • PlayStatusBar.java
    • res
      • layout
        • activity_play_status_bar.xml
        • activity_play_transitions.xml
      • values
        • colors.xml
        • strings.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboard
+24-6Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
package com.coder.guoy.recyclerview.ui;
22

3+
import android.app.ActivityOptions;
4+
import android.content.Intent;
35
import android.os.Bundle;
6+
import android.support.v7.app.AppCompatActivity;
47
import android.view.View;
8+
import android.widget.FrameLayout;
9+
import android.widget.ImageView;
10+
import android.widget.LinearLayout;
11+
import android.widget.TextView;
512

613
import com.coder.guoy.recyclerview.R;
7-
import com.coder.guoy.recyclerview.base.MvvmBaseActivity;
8-
import com.coder.guoy.recyclerview.databinding.ActivityPlayTransitionsBinding;
914

1015
/**
1116
* @Version:v1.0
1217
* @Author:Guoy
1318
* @CreateTime:
1419
* @Descrpiton:ActivityTransitions|转场动画
1520
*/
16-
public class PlayActivityTransitions extends MvvmBaseActivity<ActivityPlayTransitionsBinding> implements View.OnClickListener {
21+
public class PlayActivityTransitions extends AppCompatActivity implements View.OnClickListener {
22+
23+
private ImageView imageView;
24+
private LinearLayout layoutGo;
1725

1826
@Override
1927
protected void onCreate(Bundle savedInstanceState) {
2028
super.onCreate(savedInstanceState);
2129
setContentView(R.layout.activity_play_transitions);
22-
showContentView();
23-
bindingView.activitytransition.textviewTitle.setText("ActivityTransitions|转场动画");
24-
bindingView.activitytransition.toolbarBack.setOnClickListener(this);
30+
TextView textView = (TextView) findViewById(R.id.textview_title);
31+
FrameLayout layout = (FrameLayout) findViewById(R.id.toolbar_back);
32+
layoutGo = (LinearLayout) findViewById(R.id.layout_go);
33+
imageView = (ImageView) findViewById(R.id.image_go);
34+
textView.setText("ActivityTransitions|转场动画");
35+
layout.setOnClickListener(this);
36+
layoutGo.setOnClickListener(this);
2537
}
2638

2739
@Override
@@ -30,6 +42,12 @@ public void onClick(View v) {
3042
case R.id.toolbar_back:
3143
finish();
3244
break;
45+
case R.id.layout_go:
46+
Intent intent = new Intent(PlayActivityTransitions.this, PlayStatusBar.class);
47+
Bundle options = ActivityOptions.makeSceneTransitionAnimation(
48+
this, imageView, "shareimage").toBundle();
49+
startActivity(intent, options);
50+
break;
3351
}
3452
}
3553
}
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/java/com/coder/guoy/recyclerview/ui/PlayStatusBar.java
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
import android.os.Bundle;
66
import android.support.v7.app.AppCompatActivity;
77
import android.view.View;
8+
import android.view.animation.AlphaAnimation;
9+
import android.view.animation.LayoutAnimationController;
10+
import android.widget.LinearLayout;
811

912
import com.coder.guoy.recyclerview.R;
13+
1014
/**
1115
* @Version:v1.0
1216
* @Author:Guoy
@@ -27,5 +31,16 @@ protected void onCreate(Bundle savedInstanceState) {
2731
decorView.setSystemUiVisibility(option);
2832
getWindow().setStatusBarColor(Color.TRANSPARENT);
2933
}
34+
setLayoutAnimation();
35+
}
36+
37+
38+
private void setLayoutAnimation() {
39+
LinearLayout layout = (LinearLayout) findViewById(R.id.activity_play_status_bar);
40+
AlphaAnimation alpha = new AlphaAnimation(0, 1);
41+
alpha.setDuration(300);
42+
LayoutAnimationController controller = new LayoutAnimationController(alpha, 0.3f);
43+
controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
44+
layout.setLayoutAnimation(controller);
3045
}
3146
}
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/res/layout/activity_play_status_bar.xml
+34-2Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,50 @@
22
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/activity_play_status_bar"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
78
android:orientation="vertical"
89
tools:context="com.coder.guoy.recyclerview.ui.PlayStatusBar">
910

10-
1111
<ImageView
1212
android:layout_width="match_parent"
13-
android:layout_height="match_parent"
13+
android:layout_height="400dp"
1414
android:scaleType="centerCrop"
1515
android:src="@drawable/head"
16+
android:transitionName="shareimage"
1617
/>
1718

19+
<TextView
20+
android:layout_width="match_parent"
21+
android:layout_height="50dp"
22+
android:layout_margin="5dp"
23+
android:text="@string/text2"/>
24+
25+
<TextView
26+
android:layout_width="match_parent"
27+
android:layout_height="50dp"
28+
android:layout_margin="5dp"
29+
android:text="@string/text2"/>
30+
31+
<TextView
32+
android:layout_width="match_parent"
33+
android:layout_height="50dp"
34+
android:layout_margin="5dp"
35+
android:text="@string/text2"/>
36+
37+
<TextView
38+
android:layout_width="match_parent"
39+
android:layout_height="50dp"
40+
android:layout_margin="5dp"
41+
android:text="@string/text2"/>
42+
43+
44+
<TextView
45+
android:layout_width="match_parent"
46+
android:layout_height="50dp"
47+
android:layout_margin="5dp"
48+
android:text="@string/text2"/>
49+
1850

1951
</LinearLayout>
Collapse file

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

Copy file name to clipboard
+27-13Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<layout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
4-
xmlns:tools="http://schemas.android.com/tools">
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:orientation="vertical">
9+
10+
<include
11+
android:id="@+id/activitytransition"
12+
layout="@layout/toolbar"/>
513

614
<LinearLayout
15+
android:id="@+id/layout_go"
716
android:layout_width="match_parent"
8-
android:layout_height="match_parent">
17+
android:layout_height="wrap_content"
18+
android:orientation="horizontal">
919

10-
<include
11-
android:id="@+id/activitytransition"
12-
layout="@layout/toolbar"/>
20+
<ImageView
21+
android:id="@+id/image_go"
22+
android:layout_width="100dp"
23+
android:layout_height="100dp"
24+
android:layout_gravity="center"
25+
android:layout_margin="5dp"
26+
android:background="@drawable/head"
27+
android:transitionName="shareimage"/>
1328

14-
<Button
15-
android:id="@+id/btn_transition_explode"
29+
<TextView
30+
android:layout_margin="5dp"
1631
android:layout_width="match_parent"
17-
android:layout_height="wrap_content"/>
18-
19-
32+
android:layout_height="100dp"
33+
android:text="@string/text2"/>
2034
</LinearLayout>
21-
</layout>
35+
</LinearLayout>
Collapse file

‎app/src/main/res/values/colors.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/values/colors.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<color name="colorPrimary">#3F51B5</color>
4-
<color name="colorPrimaryDark">#303F9F</color>
5-
<color name="colorAccent">#303F9F</color>
3+
<color name="colorPrimary">#2c2d41</color>
4+
<color name="colorPrimaryDark">#2c2d41</color>
5+
<color name="colorAccent">#2c2d41</color>
66

77
<color name="toast_bg">#dddfe0</color>
88
<!--主题颜色-->
Collapse file

‎app/src/main/res/values/strings.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/values/strings.xml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
4. CollapsingToolbarLayout是对Toolbar再次包装的ViewGroup,用来实现折叠或拉伸效果的,他需要放到AppBarLayout里面,
1616
并且是直接子View,CollapsingToolbarLayout子View里面要设置属性`app:layout_collapseMode`里面的值
1717
pin表示当上滑时该控件保留,其他控件不留\n</string>
18+
<string name="text2">Android Material Design 风格控件的学习及遇到的问题;Tablayout | 横向布局标签,TextInputLayout | 文字输入布局 ,FloatingActionButton | 悬浮按钮, CoordinatorLayout APPBarLayout CollapsingTabLayout实现折叠头布局,BottomSheetDialog | 底部对话框,Touch Feedback| 触摸反馈,Reveal Effect| 揭示效果,Curved motion | 曲线运动,Animated Vector Drawables | 矢量图片动画</string>
1819
<string name="MOTTO">刚则易折,柔则长存</string>
1920
<string name="pleasewait">敬请期待</string>
2021
<string name="CoordinatorLayout">折叠布局的嵌套</string>

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.