summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2021-08-03 17:26:44 -0700
committerJon Miranda <jonmiranda@google.com>2021-08-04 12:00:36 -0700
commita56cb8414157cd2a808696f64db1f961b88da637 (patch)
tree0d079bc49d1e296d04a338209d8e407c080a20b1
parent25399db1e7495132eafc5eb9ca0cacdcb38148fd (diff)
downloadLauncher3-a56cb8414157cd2a808696f64db1f961b88da637.tar.gz
Update extra space allocations for taller devices.
- Take less space from cells - Distribute some of the empty space above the workspace - Already confirmed from previous testing that these thresholds only affect taller devices Bug: 194688362 Test: long press on app icons, test drag and drop bounds test drop target bounds test folder opening bounds test all grids on taller devices Change-Id: If90b7663ab4afedca1193bdd73a0ae38a1f25243
-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.