summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/StateManager.java
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-15 13:48:08 -0700
committerBobby Georgescu <georgescu@google.com>2012-10-16 16:30:17 -0700
commit641b838e49a445592b17e56b11374d92f99789f2 (patch)
tree1663518062277bad145c2f5d55a907728d51c244 /src/com/android/gallery3d/app/StateManager.java
parentc057d64b701fc2de9f0d5fec7dbd34779647a442 (diff)
downloadandroid_packages_apps_Snap-641b838e49a445592b17e56b11374d92f99789f2.tar.gz
android_packages_apps_Snap-641b838e49a445592b17e56b11374d92f99789f2.tar.bz2
android_packages_apps_Snap-641b838e49a445592b17e56b11374d92f99789f2.zip
Consistent animations & up button behavior in Gallery
Bug: 7302857 Bug: 7295464 This CL makes all of the transition animations throughout the Gallery app consistent. The animation is the previous view shrinking and fading out while the new view starts out bigger than the view port and is coming in to the viewport size as it fades in. Having consistent animations allows us to not keep PhotoPage/AlbumPage instances around in certain cases, making it possible to have consistent up button behavior when switching between the grid and filmstrip. Finally, this also makes the transitions in the camera app filmstrip/grid switching consistent with those in the gallery app. Change-Id: I77bac6a0cde1e439738c78f9e16ab15ed5910cfb
Diffstat (limited to 'src/com/android/gallery3d/app/StateManager.java')
-rw-r--r--src/com/android/gallery3d/app/StateManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/StateManager.java b/src/com/android/gallery3d/app/StateManager.java
index c041b0e6f..10de5d201 100644
--- a/src/com/android/gallery3d/app/StateManager.java
+++ b/src/com/android/gallery3d/app/StateManager.java
@@ -57,6 +57,7 @@ public class StateManager {
}
if (!mStack.isEmpty()) {
ActivityState top = getTopState();
+ top.fadeOutOnNextPause();
if (mIsResumed) top.onPause();
}
state.initialize(mActivity, data);
@@ -81,6 +82,7 @@ public class StateManager {
if (!mStack.isEmpty()) {
ActivityState as = getTopState();
+ as.fadeOutOnNextPause();
as.mReceivedResults = state.mResult;
if (mIsResumed) as.onPause();
} else {
@@ -207,6 +209,10 @@ public class StateManager {
}
// Remove the top state.
mStack.pop();
+ if (!data.containsKey(PhotoPage.KEY_APP_BRIDGE)) {
+ // Do not do the fade out stuff when we are switching camera modes
+ oldState.fadeOutOnNextPause();
+ }
if (mIsResumed) oldState.onPause();
oldState.onDestroy();