88
99import moe .codeest .ecardflowdemo .R ;
1010
11- public class MainActivity extends AppCompatActivity implements View . OnClickListener {
11+ import static moe . codeest . ecardflowdemo . activity . CardFlowLayoutActivity . ANIM_MODE ;
1212
13- AppCompatButton btnCard , btnLayout , btnLayoutBlur , btnLayoutMove ;
13+ public class MainActivity extends AppCompatActivity implements View . OnClickListener {
1414
15+ AppCompatButton btnCard , btnLayout , btnLayoutBlur , btnLayoutMove , btnLayoutScale , btnLayoutCrossMove ;
1516
1617 @ Override
1718 public void onCreate (Bundle savedInstanceState ) {
@@ -22,11 +23,15 @@ public void onCreate(Bundle savedInstanceState) {
2223 btnLayout = (AppCompatButton ) findViewById (R .id .btn_layout );
2324 btnLayoutBlur = (AppCompatButton ) findViewById (R .id .btn_layout_blur );
2425 btnLayoutMove = (AppCompatButton ) findViewById (R .id .btn_layout_move );
26+ btnLayoutScale = (AppCompatButton ) findViewById (R .id .btn_layout_scale );
27+ btnLayoutCrossMove = (AppCompatButton ) findViewById (R .id .btn_layout_cross );
2528
2629 btnCard .setOnClickListener (this );
2730 btnLayout .setOnClickListener (this );
2831 btnLayoutBlur .setOnClickListener (this );
2932 btnLayoutMove .setOnClickListener (this );
33+ btnLayoutScale .setOnClickListener (this );
34+ btnLayoutCrossMove .setOnClickListener (this );
3035 }
3136
3237 @ Override
@@ -36,15 +41,23 @@ public void onClick(View v) {
3641 startActivity (it );
3742 } else if (v == btnLayout ) {
3843 Intent it = new Intent (this , CardFlowLayoutActivity .class );
39- it .putExtra ("mode" , CardFlowLayoutActivity .MODE_DEFAULT );
44+ it .putExtra (CardFlowLayoutActivity . ANIM_MODE , CardFlowLayoutActivity .MODE_DEFAULT );
4045 startActivity (it );
4146 } else if (v == btnLayoutBlur ) {
4247 Intent it = new Intent (this , CardFlowLayoutActivity .class );
43- it .putExtra ("mode" , CardFlowLayoutActivity .MODE_BLUR );
48+ it .putExtra (CardFlowLayoutActivity .ANIM_MODE , CardFlowLayoutActivity .MODE_BLUR );
49+ startActivity (it );
50+ } else if (v == btnLayoutMove ) {
51+ Intent it = new Intent (this , CardFlowLayoutActivity .class );
52+ it .putExtra (CardFlowLayoutActivity .ANIM_MODE , CardFlowLayoutActivity .MODE_MOVE );
53+ startActivity (it );
54+ } else if (v == btnLayoutScale ) {
55+ Intent it = new Intent (this , CardFlowLayoutActivity .class );
56+ it .putExtra (CardFlowLayoutActivity .ANIM_MODE , CardFlowLayoutActivity .MODE_SCALE );
4457 startActivity (it );
4558 } else {
4659 Intent it = new Intent (this , CardFlowLayoutActivity .class );
47- it .putExtra ("mode" , CardFlowLayoutActivity .MODE_MOVE );
60+ it .putExtra (CardFlowLayoutActivity . ANIM_MODE , CardFlowLayoutActivity .MODE_CROSS_MOVE );
4861 startActivity (it );
4962 }
5063 }
0 commit comments