11package com .saulmm .material ;
22
33import android .animation .Animator ;
4- import android .animation .LayoutTransition ;
54import android .app .Activity ;
6- import android .app .Fragment ;
7- import android .graphics .Outline ;
85import android .os .Bundle ;
9- import android .transition .ChangeBounds ;
10- import android .transition .CircularPropagation ;
11- import android .transition .Explode ;
12- import android .transition .Scene ;
13- import android .transition .Slide ;
146import android .transition .Transition ;
15- import android .transition .TransitionManager ;
16- import android .view .Menu ;
17- import android .view .MenuItem ;
187import android .view .View ;
19- import android .view .ViewGroup ;
208import android .view .ViewPropertyAnimator ;
21- import android .widget .FrameLayout ;
229import android .widget .LinearLayout ;
2310
24- import com .saulmm .material .R ;
25-
2611public class MyActivity2 extends Activity {
2712
2813 private static final int NUM_VIEWS = 5 ;
29- private static final int SCALE_ITEM_ANIMATION_DELAY = 30 ;
14+ private static final int SCALE_DELAY = 30 ;
3015 private LinearLayout rowContainer ;
3116
3217 @ Override
@@ -59,7 +44,7 @@ public void onTransitionEnd(Transition transition) {
5944 for (int i = 0 ; i < rowContainer .getChildCount (); i ++) {
6045
6146 View rowView = rowContainer .getChildAt (i );
62- rowView .animate ().setStartDelay (i * SCALE_ITEM_ANIMATION_DELAY )
47+ rowView .animate ().setStartDelay (i * SCALE_DELAY )
6348 .scaleX (1 ).scaleY (1 );
6449 }
6550 }
@@ -72,7 +57,7 @@ public void onBackPressed() {
7257 for (int i = 0 ; i < rowContainer .getChildCount (); i ++) {
7358
7459 View rowView = rowContainer .getChildAt (i );
75- ViewPropertyAnimator propertyAnimator = rowView .animate ().setStartDelay (i * SCALE_ITEM_ANIMATION_DELAY )
60+ ViewPropertyAnimator propertyAnimator = rowView .animate ().setStartDelay (i * SCALE_DELAY )
7661 .scaleX (0 ).scaleY (0 );
7762
7863 propertyAnimator .setListener (new Animator .AnimatorListener () {
0 commit comments