[automerger] Using dragHandle for workspace padding calculation instead of pageIndicator am: 08ef66789b

Change-Id: If1cee04dcd365d87328119ccec457c30c0fb317d
This commit is contained in:
Android Build Merger (Role) 2018-05-10 18:33:17 +00:00
commit 1e4420c4ab
5 changed files with 11 additions and 17 deletions

View File

@ -42,8 +42,7 @@ public class LayoutUtils {
if (dp.isVerticalBarLayout()) {
extraSpace = 0;
} else {
Resources res = context.getResources();
extraSpace = dp.hotseatBarSizePx + res.getDimension(R.dimen.vertical_drag_handle_size);
extraSpace = dp.hotseatBarSizePx + dp.verticalDragHandleSizePx;
}
calculateTaskSize(context, dp, extraSpace, MULTI_WINDOW_STRATEGY_HALF_SCREEN, outRect);
}

View File

@ -25,7 +25,6 @@
<dimen name="fastscroll_popup_text_size">24dp</dimen>
<!-- Dynamic grid -->
<dimen name="dynamic_grid_min_page_indicator_size">48dp</dimen>
<dimen name="dynamic_grid_icon_drawable_padding">4dp</dimen>
<dimen name="dynamic_grid_cell_layout_padding">0dp</dimen>

View File

@ -15,9 +15,6 @@
-->
<resources>
<!-- Dynamic Grid -->
<dimen name="dynamic_grid_min_page_indicator_size">24dp</dimen>
<!-- All Apps -->
<dimen name="all_apps_button_scale_down">8dp</dimen>
<dimen name="all_apps_empty_search_message_top_offset">64dp</dimen>

View File

@ -20,7 +20,6 @@
<!-- Dynamic Grid -->
<dimen name="dynamic_grid_edge_margin">8dp</dimen>
<dimen name="dynamic_grid_min_page_indicator_size">24dp</dimen>
<dimen name="dynamic_grid_page_indicator_line_height">1dp</dimen>
<dimen name="dynamic_grid_icon_drawable_padding">8dp</dimen>
<dimen name="dynamic_grid_workspace_top_padding">8dp</dimen>

View File

@ -70,8 +70,8 @@ public class DeviceProfile {
public float workspaceSpringLoadShrinkFactor;
public final int workspaceSpringLoadedBottomSpace;
// Page indicator
public final int pageIndicatorSizePx;
// Drag handle
public final int verticalDragHandleSizePx;
// Workspace icons
public int iconSizePx;
@ -160,8 +160,8 @@ public class DeviceProfile {
res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_layout_padding);
cellLayoutBottomPaddingPx =
res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_layout_bottom_padding);
pageIndicatorSizePx = res.getDimensionPixelSize(
R.dimen.dynamic_grid_min_page_indicator_size);
verticalDragHandleSizePx = res.getDimensionPixelSize(
R.dimen.vertical_drag_handle_size);
defaultPageSpacingPx =
res.getDimensionPixelSize(R.dimen.dynamic_grid_workspace_page_spacing);
topWorkspacePadding =
@ -208,7 +208,7 @@ public class DeviceProfile {
// in portrait mode closer together by adding more height to the hotseat.
// Note: This calculation was created after noticing a pattern in the design spec.
int extraSpace = getCellSize().y - iconSizePx - iconDrawablePaddingPx;
hotseatBarSizePx += extraSpace - pageIndicatorSizePx;
hotseatBarSizePx += extraSpace - verticalDragHandleSizePx;
// Recalculate the available dimensions using the new hotseat size.
updateAvailableDimensions(dm, res);
@ -332,7 +332,7 @@ public class DeviceProfile {
if (!isVerticalLayout) {
int expectedWorkspaceHeight = availableHeightPx - hotseatBarSizePx
- pageIndicatorSizePx - topWorkspacePadding;
- verticalDragHandleSizePx - topWorkspacePadding;
float minRequiredHeight = dropTargetBarSizePx + workspaceSpringLoadedBottomSpace;
workspaceSpringLoadShrinkFactor = Math.min(
res.getInteger(R.integer.config_workspaceSpringLoadShrinkPercentage) / 100.0f,
@ -429,13 +429,13 @@ public class DeviceProfile {
padding.right = hotseatBarSidePaddingPx;
if (isSeascape()) {
padding.left += hotseatBarSizePx;
padding.right += pageIndicatorSizePx;
padding.right += verticalDragHandleSizePx;
} else {
padding.left += pageIndicatorSizePx;
padding.left += verticalDragHandleSizePx;
padding.right += hotseatBarSizePx;
}
} else {
int paddingBottom = hotseatBarSizePx + pageIndicatorSizePx;
int paddingBottom = hotseatBarSizePx + verticalDragHandleSizePx;
if (isTablet) {
// Pad the left and right of the workspace to ensure consistent spacing
// between all icons
@ -502,7 +502,7 @@ public class DeviceProfile {
mInsets.top + dropTargetBarSizePx + edgeMarginPx,
mInsets.left + availableWidthPx - edgeMarginPx,
mInsets.top + availableHeightPx - hotseatBarSizePx
- pageIndicatorSizePx - edgeMarginPx);
- verticalDragHandleSizePx - edgeMarginPx);
}
}