Matching hotseat to spec.
- Fixing regression in hottest folder background getting clipped - Ensuring that the padding is correctly applied in vertical bar layout to match workspace Bug: 30021487 Change-Id: I09bce21829867f4bd4e50646e565959421e4984c
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<dimen name="dynamic_grid_overview_bar_item_width">80dp</dimen>
|
||||
<dimen name="dynamic_grid_overview_bar_spacer_width">25dp</dimen>
|
||||
<dimen name="dynamic_grid_hotseat_height">88dp</dimen>
|
||||
<dimen name="dynamic_grid_hotseat_top_padding">12dp</dimen>
|
||||
<dimen name="dynamic_grid_hotseat_top_padding">8dp</dimen>
|
||||
<dimen name="dynamic_grid_hotseat_gutter_width">24dp</dimen>
|
||||
<dimen name="dynamic_grid_workspace_top_padding">12dp</dimen>
|
||||
<dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
|
||||
|
||||
@@ -460,7 +460,7 @@ public class DeviceProfile {
|
||||
qsbContainer.setLayoutParams(lp);
|
||||
|
||||
// Layout the hotseat
|
||||
View hotseat = launcher.findViewById(R.id.hotseat);
|
||||
Hotseat hotseat = (Hotseat) launcher.findViewById(R.id.hotseat);
|
||||
lp = (FrameLayout.LayoutParams) hotseat.getLayoutParams();
|
||||
// We want the edges of the hotseat to line up with the edges of the workspace, but the
|
||||
// icons in the hotseat are a different size, and so don't line up perfectly. To account for
|
||||
@@ -475,27 +475,25 @@ public class DeviceProfile {
|
||||
lp.gravity = Gravity.RIGHT;
|
||||
lp.width = hotseatBarHeightPx + mInsets.left + mInsets.right;
|
||||
lp.height = LayoutParams.MATCH_PARENT;
|
||||
hotseat.findViewById(R.id.layout).setPadding(0, 2 * edgeMarginPx, 0, 2 * edgeMarginPx);
|
||||
hotseat.setPadding(mInsets.left, 0, mInsets.right, 0);
|
||||
hotseat.getLayout().setPadding(mInsets.left, mInsets.top, mInsets.right,
|
||||
workspacePadding.bottom);
|
||||
} else if (isTablet) {
|
||||
// Pad the hotseat with the workspace padding calculated above
|
||||
lp.gravity = Gravity.BOTTOM;
|
||||
lp.width = LayoutParams.MATCH_PARENT;
|
||||
lp.height = hotseatBarHeightPx + mInsets.bottom;
|
||||
hotseat.findViewById(R.id.layout).setPadding(
|
||||
hotseatAdjustment + workspacePadding.left, 0,
|
||||
hotseatAdjustment + workspacePadding.right, 2 * edgeMarginPx);
|
||||
hotseat.setPadding(0, hotseatBarTopPaddingPx, 0, mInsets.bottom);
|
||||
hotseat.getLayout().setPadding(hotseatAdjustment + workspacePadding.left,
|
||||
hotseatBarTopPaddingPx, hotseatAdjustment + workspacePadding.right,
|
||||
mInsets.bottom);
|
||||
} else {
|
||||
// For phones, layout the hotseat without any bottom margin
|
||||
// to ensure that we have space for the folders
|
||||
lp.gravity = Gravity.BOTTOM;
|
||||
lp.width = LayoutParams.MATCH_PARENT;
|
||||
lp.height = hotseatBarHeightPx + mInsets.bottom;
|
||||
hotseat.findViewById(R.id.layout).setPadding(
|
||||
hotseatAdjustment + workspacePadding.left, 0,
|
||||
hotseatAdjustment + workspacePadding.right, 0);
|
||||
hotseat.setPadding(0, hotseatBarTopPaddingPx, 0, mInsets.bottom);
|
||||
hotseat.getLayout().setPadding(hotseatAdjustment + workspacePadding.left,
|
||||
hotseatBarTopPaddingPx, hotseatAdjustment + workspacePadding.right,
|
||||
mInsets.bottom);
|
||||
}
|
||||
hotseat.setLayoutParams(lp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user