Merge "Tune widget picker bottom sheet VisD for large screen" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b66fc8b145
@@ -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);
|
||||
|
||||
@@ -163,9 +163,8 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher>
|
||||
widthUsed = Math.max(widthUsed, minUsedWidth);
|
||||
}
|
||||
|
||||
int heightUsed = mInsets.top + deviceProfile.edgeMarginPx;
|
||||
measureChildWithMargins(mContent, widthMeasureSpec,
|
||||
widthUsed, heightMeasureSpec, heightUsed);
|
||||
widthUsed, heightMeasureSpec, deviceProfile.bottomSheetTopPadding);
|
||||
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec),
|
||||
MeasureSpec.getSize(heightMeasureSpec));
|
||||
}
|
||||
|
||||
@@ -96,8 +96,6 @@ public class WidgetsFullSheet extends BaseWidgetSheet
|
||||
private static final String KEY_WIDGETS_EDUCATION_DIALOG_SEEN =
|
||||
"launcher.widgets_education_dialog_seen";
|
||||
|
||||
private final Rect mInsets = new Rect();
|
||||
|
||||
private final UserManagerState mUserManagerState = new UserManagerState();
|
||||
|
||||
private final boolean mHasWorkProfile;
|
||||
|
||||
Reference in New Issue
Block a user