summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Miranda <jonmiranda@google.com>2021-08-05 18:33:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-08-05 18:33:56 +0000
commitdd16ecbc61fce7ae486dad51a89c99e2c9a2a289 (patch)
tree451f9d43cfd5015270261e28401c35ce1a4b45a9
parent9d5749fd7ff5b27c564f8a8d661fc60d1d2c7559 (diff)
parenta56cb8414157cd2a808696f64db1f961b88da637 (diff)
downloadLauncher3-dd16ecbc61fce7ae486dad51a89c99e2c9a2a289.tar.gz
Merge "Update extra space allocations for taller devices." into sc-dev
-rw-r--r--src/com/android/launcher3/DeviceProfile.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 59962dd795..81eda10a15 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -386,14 +386,15 @@ public class DeviceProfile {
// For devices with more extra space, we take a larger piece from each cell.
int piece = extraSpace < Utilities.dpToPx(TALL_DEVICE_MORE_EXTRA_SPACE_THRESHOLD_DP)
- ? 5 : 3;
+ ? 7 : 5;
int extraSpace = ((getCellSize().y - iconSizePx - iconDrawablePaddingPx * 2)
* inv.numRows) / piece;
- int halfExtraSpace = extraSpace / 2;
- hotseatBarTopPaddingPx += halfExtraSpace;
- hotseatBarSizeExtraSpacePx = halfExtraSpace;
+ workspaceTopPadding = extraSpace / 8;
+ int halfLeftOver = (extraSpace - workspaceTopPadding) / 2;
+ hotseatBarTopPaddingPx += halfLeftOver;
+ hotseatBarSizeExtraSpacePx = halfLeftOver;
} else {
// ie. For a display with a large aspect ratio, we can keep the icons on the
// workspace in portrait mode closer together by adding more height to the hotseat.