Transition API changes from API council recommendations
Issue #10460684 KLP API Review: android.view.transition and android.animation
Issue #10570740 Transitions: inflate transition targets from xml
Change-Id: I7a3f6d3aece2fcafc5efd555d033f79e86635c98
diff --git a/tests/TransitionTests/src/com/android/transitiontests/CrossfadeImage.java b/tests/TransitionTests/src/com/android/transitiontests/CrossfadeImage.java
index 28e055f..09b495f 100644
--- a/tests/TransitionTests/src/com/android/transitiontests/CrossfadeImage.java
+++ b/tests/TransitionTests/src/com/android/transitiontests/CrossfadeImage.java
@@ -19,12 +19,12 @@
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
-import android.view.transition.Crossfade;
-import android.view.transition.Move;
-import android.view.transition.Scene;
-import android.view.transition.Transition;
-import android.view.transition.TransitionGroup;
-import android.view.transition.TransitionManager;
+import android.transition.Crossfade;
+import android.transition.ChangeBounds;
+import android.transition.Scene;
+import android.transition.Transition;
+import android.transition.TransitionSet;
+import android.transition.TransitionManager;
import android.widget.ImageView;
public class CrossfadeImage extends Activity {
@@ -48,11 +48,11 @@
mImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
Crossfade mCrossfade = new Crossfade();
- mCrossfade.setTargetIds(R.id.contact_picture);
+ mCrossfade.addTargetId(R.id.contact_picture);
- TransitionGroup group = new TransitionGroup();
+ TransitionSet group = new TransitionSet();
group.setDuration(1500);
- group.addTransitions(mCrossfade, new Move());
+ group.addTransition(mCrossfade).addTransition(new ChangeBounds());
mTransition = group;
}