summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-09-16 16:52:59 -0700
committerAdam Cohen <adamcohen@google.com>2013-09-16 16:53:18 -0700
commitf343499f9b2c01978027e810255274b714ac457d (patch)
tree56c2b7d76cdffffde326db9a00e0d1984a2d0718 /src/com/android/launcher3/Workspace.java
parentd3ecce919296594ceeed6619d32994360b65ae40 (diff)
downloadandroid_packages_apps_Trebuchet-f343499f9b2c01978027e810255274b714ac457d.tar.gz
android_packages_apps_Trebuchet-f343499f9b2c01978027e810255274b714ac457d.tar.bz2
android_packages_apps_Trebuchet-f343499f9b2c01978027e810255274b714ac457d.zip
Making sure CustomContent is never visible during overview / springloaded
Change-Id: I187f7fcfbd4e24e20959c9e0cf5fd5400d006f45
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 3d467a164..e7ea221be 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1756,14 +1756,11 @@ public class Workspace extends SmoothPagedView
Animator workspaceAnim = getChangeStateAnimation(finalState, animated, 0, snapPage);
if (workspaceAnim != null) {
+ onTransitionPrepare();
workspaceAnim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator arg0) {
- mIsSwitchingState = false;
- }
- @Override
- public void onAnimationStart(Animator arg0) {
- mIsSwitchingState = true;
+ onTransitionEnd();
}
});
workspaceAnim.start();
@@ -1956,13 +1953,11 @@ public class Workspace extends SmoothPagedView
view.setVisibility(VISIBLE);
}
}
-
}
@Override
public void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean toWorkspace) {
- mIsSwitchingState = true;
- updateChildrenLayersEnabled(false);
+ onTransitionPrepare();
}
@Override
@@ -1976,6 +1971,20 @@ public class Workspace extends SmoothPagedView
@Override
public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) {
+ onTransitionEnd();
+ }
+
+ private void onTransitionPrepare() {
+ mIsSwitchingState = true;
+ updateChildrenLayersEnabled(false);
+ if (mState != Workspace.State.NORMAL) {
+ if (hasCustomContent()) {
+ mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(INVISIBLE);
+ }
+ }
+ }
+
+ private void onTransitionEnd() {
mIsSwitchingState = false;
updateChildrenLayersEnabled(false);
// The code in getChangeStateAnimation to determine initialAlpha and finalAlpha will ensure
@@ -1988,6 +1997,11 @@ public class Workspace extends SmoothPagedView
cl.setShortcutAndWidgetAlpha(1f);
}
}
+ if (mState == Workspace.State.NORMAL) {
+ if (hasCustomContent()) {
+ mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(VISIBLE);
+ }
+ }
}
@Override