summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Marble <drmarble1@gmail.com>2014-06-11 14:21:14 -0500
committerDavid Marble <drmarble1@gmail.com>2014-06-11 15:18:11 -0500
commit401aafed7995cb3b43eaae47590f4b17ae6e1ceb (patch)
tree0c8e2afdb04e4c2ca090c192ea38cc8d665a9a9b
parenteebcb7db349310d36e0ba2066ce4167f9b1d0627 (diff)
downloadandroid_packages_apps_Trebuchet-401aafed7995cb3b43eaae47590f4b17ae6e1ceb.tar.gz
android_packages_apps_Trebuchet-401aafed7995cb3b43eaae47590f4b17ae6e1ceb.tar.bz2
android_packages_apps_Trebuchet-401aafed7995cb3b43eaae47590f4b17ae6e1ceb.zip
Improve margins for small tablets
We are currently allocating too much space on the side margins in landscape on small tablets with the searchbar hidden. This fixes the logic for determining the space. The margins to the left side and the hot seat are the same, rather than wider on the left side as they are now. Change-Id: Ic57aa4f850253f1ec1f8858b4a137c8d8a2ad534
-rw-r--r--src/com/android/launcher3/DeviceProfile.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index b09f67edf..676f91b21 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -241,7 +241,7 @@ public class DeviceProfile {
searchBarVisible = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
R.bool.preferences_interface_homescreen_search_default);
searchBarSpaceWidthPx = Math.min(searchBarSpaceMaxWidthPx, widthPx);
- searchBarSpaceHeightPx = searchBarHeightPx + (searchBarVisible ? 2 * edgeMarginPx : 0);
+ searchBarSpaceHeightPx = 2 * edgeMarginPx + (searchBarVisible ? searchBarHeightPx : 0);
}
void addCallback(DeviceProfileCallbacks cb) {
@@ -651,8 +651,7 @@ public class DeviceProfile {
// Update search bar for live settings
searchBarVisible = SettingsProvider.getBoolean(launcher, SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
R.bool.preferences_interface_homescreen_search_default);
- searchBarSpaceHeightPx = searchBarHeightPx + (searchBarVisible ? 2 * edgeMarginPx : 0);
-
+ searchBarSpaceHeightPx = 2 * edgeMarginPx + (searchBarVisible ? searchBarHeightPx : 0);
FrameLayout.LayoutParams lp;
Resources res = launcher.getResources();
boolean hasVerticalBarLayout = isVerticalBarLayout();