diff options
| author | George Mount <mount@google.com> | 2014-05-28 14:37:34 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-28 14:37:34 +0000 |
| commit | 1cc3e2e7a0522a8ab95031911ac66249c1ccbdf3 (patch) | |
| tree | 726e9213f33a3d122324beabed07f430426d1183 | |
| parent | f0ebc5dc2131341a323d101feed83ba8c5f1ca8d (diff) | |
| parent | a8bd9294387a415f02e9cdeb80c8215bb601dd06 (diff) | |
| download | frameworks_base-1cc3e2e7a0522a8ab95031911ac66249c1ccbdf3.zip frameworks_base-1cc3e2e7a0522a8ab95031911ac66249c1ccbdf3.tar.gz frameworks_base-1cc3e2e7a0522a8ab95031911ac66249c1ccbdf3.tar.bz2 | |
Merge "Use activity transitions when launched from fragments." into lmp-preview-dev
| -rw-r--r-- | core/java/android/app/Activity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 07de85c..b5281ff 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -4194,7 +4194,11 @@ public class Activity extends ContextThemeWrapper */ public void startActivityFromFragment(@NonNull Fragment fragment, Intent intent, int requestCode) { - startActivityFromFragment(fragment, intent, requestCode, null); + Bundle options = null; + if (mWindow.hasFeature(Window.FEATURE_CONTENT_TRANSITIONS)) { + options = ActivityOptions.makeSceneTransitionAnimation(this).toBundle(); + } + startActivityFromFragment(fragment, intent, requestCode, options); } /** @@ -4219,6 +4223,9 @@ public class Activity extends ContextThemeWrapper */ public void startActivityFromFragment(@NonNull Fragment fragment, Intent intent, int requestCode, @Nullable Bundle options) { + if (options != null) { + mActivityTransitionState.startExitOutTransition(this, options); + } Instrumentation.ActivityResult ar = mInstrumentation.execStartActivity( this, mMainThread.getApplicationThread(), mToken, fragment, |
