Tune widget picker bottom sheet VisD for large screen

Test: Open widget picker by long pressing the home screen.
Open app specific widget picker by long pressing an app icon
that has widgets. Try both landscape and portrait, also on
phone/tablet/foldable.
Bug: 214215594

Change-Id: I7b4b3a8d7421f1d4df84d49a18b465693a17bd7b
This commit is contained in:
Andras Kloczl
2022-03-09 21:26:02 +00:00
parent deae9343be
commit 142b054e06
6 changed files with 19 additions and 10 deletions

View File

@@ -175,6 +175,7 @@ public class DeviceProfile {
public Point allAppsBorderSpacePx;
public int allAppsShiftRange;
public int allAppsTopPadding;
public int bottomSheetTopPadding;
public int allAppsCellHeightPx;
public int allAppsCellWidthPx;
public int allAppsIconSizePx;
@@ -294,8 +295,11 @@ public class DeviceProfile {
desiredWorkspaceHorizontalMarginPx = getHorizontalMarginPx(inv, res);
desiredWorkspaceHorizontalMarginOriginalPx = desiredWorkspaceHorizontalMarginPx;
allAppsTopPadding = res.getDimensionPixelSize(R.dimen.all_apps_top_padding)
+ (isTablet ? heightPx - availableHeightPx : 0);
bottomSheetTopPadding = windowBounds.insets.top // statusbar height
+ res.getDimensionPixelSize(R.dimen.bottom_sheet_extra_top_padding)
+ (isTablet ? 0 : edgeMarginPx); // phones need edgeMarginPx additional padding
allAppsTopPadding = isTablet ? bottomSheetTopPadding : 0;
allAppsShiftRange = isTablet
? heightPx - allAppsTopPadding
: res.getDimensionPixelSize(R.dimen.all_apps_starting_vertical_translate);