GeezerVison is showing github.com — 转场动画修改 · java02014/Coder@a6504f9
File tree
Expand file treeCollapse file tree
Open diff view settings
app/src/main/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/PlayActivityTransitions.java +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,7 +43,8 @@ public void onClick(View v) { |
43 | 43 | finish(); |
44 | 44 | break; |
45 | 45 | case R.id.layout_go: |
46 | | - Intent intent = new Intent(PlayActivityTransitions.this, PlayStatusBar.class); |
| 46 | + Intent intent = new Intent(PlayActivityTransitions.this, |
| 47 | + PlayStatusBar.class); |
47 | 48 | Bundle options = ActivityOptions.makeSceneTransitionAnimation( |
48 | 49 | this, imageView, "shareimage").toBundle(); |
49 | 50 | startActivity(intent, options); |
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/com/coder/guoy/recyclerview/ui/PlayRevealEffect.java +5-6Lines changed: 5 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -20,8 +20,8 @@ public class PlayRevealEffect extends MvvmBaseActivity<ActivityPlayRevealEffectB |
20 | 20 |
|
21 | 21 | private boolean isFirst = true; |
22 | 22 | private Animator animator; |
23 | | - private int width; |
24 | | - private int height; |
| 23 | + private float width; |
| 24 | + private float height; |
25 | 25 |
|
26 | 26 | @Override |
27 | 27 | protected void onCreate(Bundle savedInstanceState) { |
@@ -47,10 +47,9 @@ public void onClick(View v) { |
47 | 47 | switch (v.getId()) { |
48 | 48 | case R.id.btn_revealeffect: |
49 | 49 | if (isFirst) { |
50 | | - animator = ViewAnimationUtils.createCircularReveal( |
51 | | - bindingView.viewRevealeffect, |
52 | | - width / 2, |
53 | | - height / 2, |
| 50 | + animator = ViewAnimationUtils.createCircularReveal(bindingView.viewRevealeffect, |
| 51 | + (int)(width / 2), |
| 52 | + (int) (height / 2), |
54 | 53 | 0, |
55 | 54 | height |
56 | 55 | ); |
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/com/coder/guoy/recyclerview/ui/PlayStatusBar.java -14Lines changed: 0 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
5 | 5 | import android.os.Bundle; |
6 | 6 | import android.support.v7.app.AppCompatActivity; |
7 | 7 | import android.view.View; |
8 | | -import android.view.animation.AlphaAnimation; |
9 | | -import android.view.animation.LayoutAnimationController; |
10 | | -import android.widget.LinearLayout; |
11 | 8 |
|
12 | 9 | import com.coder.guoy.recyclerview.R; |
13 | 10 |
|
@@ -31,16 +28,5 @@ protected void onCreate(Bundle savedInstanceState) { |
31 | 28 | decorView.setSystemUiVisibility(option); |
32 | 29 | getWindow().setStatusBarColor(Color.TRANSPARENT); |
33 | 30 | } |
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); |
45 | 31 | } |
46 | 32 | } |