summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2015-09-29 20:34:09 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-09-30 15:16:28 -0700
commitb5f1c45c02ef14443c88e50d1b0bffee76a75585 (patch)
tree9d796c404414f3e88c9d10430f1a3b330a037b05 /src/com/android/launcher3/DeviceProfile.java
parent1f9ba38cec29ae3dfcb3c3592389676c0f1a87ab (diff)
downloadandroid_packages_apps_Trebuchet-b5f1c45c02ef14443c88e50d1b0bffee76a75585.tar.gz
android_packages_apps_Trebuchet-b5f1c45c02ef14443c88e50d1b0bffee76a75585.tar.bz2
android_packages_apps_Trebuchet-b5f1c45c02ef14443c88e50d1b0bffee76a75585.zip
Trebuchet : Ensure search bar doesn't show in hidden
If the user is in the app drawer, or settings panel mode, a broadcast could cause a new search target bar to be added which would reset visibility. Ensure visibility is restored. Change-Id: I9eba1eb6ac36bc9873deab1b81e1bb00ee8d4999
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index d65b4759a..8bba13c9d 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -766,11 +766,9 @@ public class DeviceProfile {
(visibleChildCount-1) * overviewModeBarSpacerWidthPx;
}
- public void layout(Launcher launcher) {
+ public void layoutSearchBar(Launcher launcher) {
// Update search bar for live settings
searchBarVisible = isSearchBarEnabled(launcher);
- searchBarSpaceHeightPx = 2 * edgeMarginPx + (searchBarVisible ?
- searchBarSpaceHeightPx - getSearchBarTopOffset() : 3 * edgeMarginPx);
FrameLayout.LayoutParams lp;
Resources res = launcher.getResources();
boolean hasVerticalBarLayout = isVerticalBarLayout();
@@ -818,10 +816,15 @@ public class DeviceProfile {
vglp.height = LayoutParams.MATCH_PARENT;
qsbBar.setLayoutParams(vglp);
}
+ }
+ public void layout(Launcher launcher) {
+ layoutSearchBar(launcher);
+ Resources res = launcher.getResources();
+ boolean hasVerticalBarLayout = isVerticalBarLayout();
// Layout the workspace
PagedView workspace = (PagedView) launcher.findViewById(R.id.workspace);
- lp = (FrameLayout.LayoutParams) workspace.getLayoutParams();
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) workspace.getLayoutParams();
lp.gravity = Gravity.CENTER;
int orientation = isLandscape ? CellLayout.LANDSCAPE : CellLayout.PORTRAIT;
Rect padding = getWorkspacePadding(orientation);