Overview - Adds first pass at making landscape layout real.

Adds dynamic sizing to margins around task view, also creates space in the
overview actions view in landscape to make space for the proactive chips if
needed.

Bug: 182529089
Test: Local build and run on two devices
Change-Id: I447de3564a3249ede4e8e8a4d3e5d1c177f6be61
This commit is contained in:
Zak Cohen
2021-03-19 16:42:07 -07:00
committed by Alex Chau
parent 59230c3cdd
commit 334efebaba
13 changed files with 87 additions and 57 deletions

View File

@@ -151,6 +151,10 @@ public class DeviceProfile {
public int allAppsIconDrawablePaddingPx;
public float allAppsIconTextSizePx;
// Overview
public int overviewTaskThumbnailTopMarginPx;
public int overviewTaskMarginPx;
// Widgets
public final PointF appWidgetScale = new PointF(1.0f, 1.0f);
@@ -297,6 +301,11 @@ public class DeviceProfile {
: (hotseatBarTopPaddingPx + hotseatBarBottomPaddingPx
+ (isScalableGrid ? 0 : hotseatExtraVerticalSize)));
overviewTaskMarginPx = res.getDimensionPixelSize(R.dimen.overview_task_margin);
overviewTaskThumbnailTopMarginPx = res.getDimensionPixelSize(
R.dimen.task_thumbnail_icon_size) + 2 * overviewTaskMarginPx;
// Calculate all of the remaining variables.
extraSpace = updateAvailableDimensions(res);
// Now that we have all of the variables calculated, we can tune certain sizes.