am 3b20ea9a: am 2fafc775: Merge "Minor fixes to animation ApiDemos" into klp-dev

* commit '3b20ea9a9ac1ede37f8acb4725602afc5cc19c61':
  Minor fixes to animation ApiDemos
This commit is contained in:
Chet Haase
2013-09-05 23:52:09 -07:00
committed by Android Git Automerger
2 changed files with 15 additions and 9 deletions

View File

@@ -1254,7 +1254,6 @@
<activity android:name=".animation.AnimationLoading" <activity android:name=".animation.AnimationLoading"
android:label="Animation/Loading" android:label="Animation/Loading"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1264,7 +1263,6 @@
<activity android:name=".animation.AnimationCloning" <activity android:name=".animation.AnimationCloning"
android:label="Animation/Cloning" android:label="Animation/Cloning"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1274,7 +1272,6 @@
<activity android:name=".animation.AnimationSeeking" <activity android:name=".animation.AnimationSeeking"
android:label="Animation/Seeking" android:label="Animation/Seeking"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1284,7 +1281,6 @@
<activity android:name=".animation.AnimatorEvents" <activity android:name=".animation.AnimatorEvents"
android:label="Animation/Events" android:label="Animation/Events"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1294,7 +1290,6 @@
<activity android:name=".animation.BouncingBalls" <activity android:name=".animation.BouncingBalls"
android:label="Animation/Bouncing Balls" android:label="Animation/Bouncing Balls"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1304,7 +1299,6 @@
<activity android:name=".animation.CustomEvaluator" <activity android:name=".animation.CustomEvaluator"
android:label="Animation/Custom Evaluator" android:label="Animation/Custom Evaluator"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1323,7 +1317,6 @@
<activity android:name=".animation.ReversingAnimation" <activity android:name=".animation.ReversingAnimation"
android:label="Animation/Reversing" android:label="Animation/Reversing"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1333,7 +1326,6 @@
<activity android:name=".animation.MultiPropertyAnimation" <activity android:name=".animation.MultiPropertyAnimation"
android:label="Animation/Multiple Properties" android:label="Animation/Multiple Properties"
android:hardwareAccelerated="false"
android:enabled="@bool/atLeastHoneycomb"> android:enabled="@bool/atLeastHoneycomb">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@@ -24,6 +24,12 @@ import android.transition.TransitionInflater;
import android.transition.TransitionManager; import android.transition.TransitionManager;
import com.example.android.apis.R; import com.example.android.apis.R;
/**
* This application demonstrates some of the capabilities and uses of the
* {@link android.transition transitions} APIs. Scenes and a TransitionManager
* are loaded from resource files and transitions are run between those scenes
* as well as a dynamically-configured scene.
*/
public class Transitions extends Activity { public class Transitions extends Activity {
Scene mScene1, mScene2, mScene3; Scene mScene1, mScene2, mScene3;
@@ -39,6 +45,11 @@ public class Transitions extends Activity {
TransitionInflater inflater = TransitionInflater.from(this); TransitionInflater inflater = TransitionInflater.from(this);
// Note that this is not the only way to create a Scene object, but that
// loading them from layout resources cooperates with the
// TransitionManager that we are also loading from resources, and which
// uses the same layout resource files to determine the scenes to transition
// from/to.
mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_scene1, this); mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_scene1, this);
mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_scene2, this); mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_scene2, this);
mScene3 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_scene3, this); mScene3 = Scene.getSceneForLayout(mSceneRoot, R.layout.transition_scene3, this);
@@ -58,7 +69,10 @@ public class Transitions extends Activity {
mTransitionManager.transitionTo(mScene3); mTransitionManager.transitionTo(mScene3);
break; break;
case R.id.scene4: case R.id.scene4:
TransitionManager.beginDelayedTransition(mSceneRoot, null); // scene4 is not an actual 'Scene', but rather a dynamic change in the UI,
// transitioned to using beginDelayedTransition() to tell the TransitionManager
// to get ready to run a transition at the next frame
TransitionManager.beginDelayedTransition(mSceneRoot);
setNewSize(R.id.view1, 150, 25); setNewSize(R.id.view1, 150, 25);
setNewSize(R.id.view2, 150, 25); setNewSize(R.id.view2, 150, 25);
setNewSize(R.id.view3, 150, 25); setNewSize(R.id.view3, 150, 25);