summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2014-05-28 14:37:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-28 14:37:34 +0000
commit1cc3e2e7a0522a8ab95031911ac66249c1ccbdf3 (patch)
tree726e9213f33a3d122324beabed07f430426d1183
parentf0ebc5dc2131341a323d101feed83ba8c5f1ca8d (diff)
parenta8bd9294387a415f02e9cdeb80c8215bb601dd06 (diff)
downloadframeworks_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.java9
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,