summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-09-19 11:57:17 -0700
committerAdam Cohen <adamcohen@google.com>2013-09-19 11:58:22 -0700
commit3f452c87db9c3639285eafd17fff6a6f9d28da44 (patch)
treee0f432dd237a753312799741b15af08f4ebb560f /src
parentdbdff6bc7b225255207a46fad8f536b55a18efac (diff)
downloadandroid_packages_apps_Trebuchet-3f452c87db9c3639285eafd17fff6a6f9d28da44.tar.gz
android_packages_apps_Trebuchet-3f452c87db9c3639285eafd17fff6a6f9d28da44.tar.bz2
android_packages_apps_Trebuchet-3f452c87db9c3639285eafd17fff6a6f9d28da44.zip
Adding some assets / fixing a couple bugs
-> Adding wallpaper, settings and widgets icons for overview mode -> Fix issues with disappearing search bar / custom content screen when screen is turned off from overview mode. Change-Id: I0904098bd642c40709e27f571e458f1b6e479c17
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Workspace.java34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 76d60a80b..6cb6a5744 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1931,7 +1931,8 @@ public class Workspace extends SmoothPagedView
AlphaUpdateListener.updateVisibility(getPageIndicator());
}
searchBar.setAlpha(finalSearchBarAlpha);
- AlphaUpdateListener.updateVisibility(mLauncher.getSearchBar());
+ AlphaUpdateListener.updateVisibility(searchBar);
+ updateCustomContentVisibility();
}
if (finalSearchBarAlpha == 0) {
mLauncher.setVoiceButtonProxyVisible(false);
@@ -1998,10 +1999,27 @@ public class Workspace extends SmoothPagedView
private void onTransitionPrepare() {
mIsSwitchingState = true;
updateChildrenLayersEnabled(false);
- if (mState != Workspace.State.NORMAL) {
- if (hasCustomContent()) {
- mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(INVISIBLE);
- }
+ hideCustomContentIfNecessary();
+ }
+
+ void updateCustomContentVisibility() {
+ int visibility = mState == Workspace.State.NORMAL ? VISIBLE : INVISIBLE;
+ if (hasCustomContent()) {
+ mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(visibility);
+ }
+ }
+
+ void showCustomContentIfNecessary() {
+ boolean show = mState == Workspace.State.NORMAL;
+ if (show && hasCustomContent()) {
+ mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(VISIBLE);
+ }
+ }
+
+ void hideCustomContentIfNecessary() {
+ boolean hide = mState != Workspace.State.NORMAL;
+ if (hide && hasCustomContent()) {
+ mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(INVISIBLE);
}
}
@@ -2018,11 +2036,7 @@ public class Workspace extends SmoothPagedView
cl.setShortcutAndWidgetAlpha(1f);
}
}
- if (mState == Workspace.State.NORMAL) {
- if (hasCustomContent()) {
- mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID).setVisibility(VISIBLE);
- }
- }
+ showCustomContentIfNecessary();
}
@Override