From aa2cb4a5978a2e37abfd9611a1241de1c4553d78 Mon Sep 17 00:00:00 2001 From: Roman Birg Date: Thu, 2 Jul 2015 13:11:31 -0700 Subject: Trebuchet: display search widget search box if available Change-Id: I3a6d930f25ca4ac1eb8a069c68a2fe9bf2aeb646 Signed-off-by: Roman Birg --- src/com/android/launcher3/DeviceProfile.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/com/android/launcher3/DeviceProfile.java') diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 47ed9b242..bbd4932f3 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -587,7 +587,7 @@ public class DeviceProfile { if (isTablet() && !isVerticalBarLayout()) { return searchBarVisible ? 4 * edgeMarginPx : 0; } else { - return searchBarVisible ? 2 * edgeMarginPx : 0; + return searchBarVisible ? edgeMarginPx : 0; } } @@ -809,9 +809,13 @@ public class DeviceProfile { lp.width = searchBarSpaceWidthPx; lp.height = searchBarSpaceHeightPx; searchBar.setPadding( - 2 * edgeMarginPx, + edgeMarginPx, getSearchBarTopOffset(), - 2 * edgeMarginPx, 0); + edgeMarginPx, edgeMarginPx); + } + if (launcher.mSearchWidgetId >= 0) { + // remove padding on widget + searchBar.setPadding(0, 0, 0, 0); } searchBar.setLayoutParams(lp); -- cgit v1.2.3