Support different task icon margin for grid tasks

- Focused and non focused grid now have differnt margin between icon and snapshot
- The overall margin above snapshot is still the same
- Invoke updateChildTaskOrientations when focus task changes to update the margin
- Also lowered the row spacing according to spec

Bug: 194194694
Test: manual
Change-Id: I25267bef19d5a8b1dc1cf96fc1babdc3ebc39330
This commit is contained in:
Alex Chau
2021-08-17 12:56:15 +01:00
parent 40f86763bc
commit eaa6d682d4
5 changed files with 18 additions and 11 deletions

View File

@@ -179,6 +179,7 @@ public class DeviceProfile {
// Overview
public final boolean overviewShowAsGrid;
public int overviewTaskMarginPx;
public int overviewTaskMarginGridPx;
public int overviewTaskIconSizePx;
public int overviewTaskIconDrawableSizePx;
public int overviewTaskIconDrawableSizeGridPx;
@@ -353,8 +354,9 @@ public class DeviceProfile {
overviewShowAsGrid = isTablet && FeatureFlags.ENABLE_OVERVIEW_GRID.get();
overviewTaskMarginPx = overviewShowAsGrid
? res.getDimensionPixelSize(R.dimen.overview_task_margin_grid)
? res.getDimensionPixelSize(R.dimen.overview_task_margin_focused)
: res.getDimensionPixelSize(R.dimen.overview_task_margin);
overviewTaskMarginGridPx = res.getDimensionPixelSize(R.dimen.overview_task_margin_grid);
overviewTaskIconSizePx = res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_size);
overviewTaskIconDrawableSizePx =
res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size);