From 4e358271d3e7e64adf0562386f97cc0e1d6e4426 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Fri, 7 Jul 2017 10:05:33 -0700 Subject: [PATCH] Tighten up vertical spacing in landscape all apps. Bug: 37015359 Bug: 62801588 Change-Id: Ia4bdc2c2b12647cd671cf8a3e7a8defc43863da1 --- res/values-land/dimens.xml | 4 +++- src/com/android/launcher3/DeviceProfile.java | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index 1ab385cb20..3ecdf59dcc 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -27,7 +27,9 @@ 120dp 48dp - 5dp + 4dp + + 2dp 18dp diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 6b76cd62f7..ca5d8e7462 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -326,7 +326,13 @@ public class DeviceProfile { if (isVerticalBarLayout()) { // Always hide the Workspace text with vertical bar layout. iconTextSizePx = 0; - allAppsCellHeightPx += Utilities.calculateTextHeight(allAppsIconTextSizePx); + iconDrawablePaddingPx = 0; + + // Manually compute all apps cell height since workspace cells have less content. + allAppsCellHeightPx = allAppsIconSizePx + allAppsIconDrawablePaddingPx + + Utilities.calculateTextHeight(allAppsIconTextSizePx) + // Top and bottom padding is equal to the drawable padding + + allAppsIconDrawablePaddingPx * 2; } cellWidthPx = iconSizePx + iconDrawablePaddingPx;