[Overview Actions] Change actions view UI based on different nav modes.

1. Change the overview actions container to 66dp height.
2. For 3 button mode, container will have 8dp bottom margin.
3. For gesture mode, container will have 16dp bottom margin.
4. Action buttons and close button will always be in the center vertically.

Spec: https://docs.google.com/presentation/d/1gXWNdCRXvXuEhgDmE0TX2KYqCxIQBXVtWKdl4pKrno8/edit#slide=id.g840c32b190_3_6

Demo:
- 3 button: https://screenshot.googleplex.com/2Y3uMaJMi9E
- gesture: https://screenshot.googleplex.com/XzaKHpp5ke9
Test: tested for both modes and when switch between.
Bug: 155444592

Change-Id: If66d369df0218b7ee2abab8a3f345488bf223b16
This commit is contained in:
Becky Qiu
2020-05-06 15:04:23 -07:00
parent 3141c99e92
commit 7d12134240
5 changed files with 47 additions and 5 deletions

View File

@@ -92,6 +92,9 @@ public abstract class BaseQuickstepLauncher extends Launcher
@Override
public void onNavigationModeChanged(Mode newMode) {
getDragLayer().recreateControllers();
if (mActionsView != null && isOverviewActionsEnabled()) {
mActionsView.updateVerticalMarginForNavModeChange(newMode);
}
}
@Override
@@ -167,13 +170,18 @@ public abstract class BaseQuickstepLauncher extends Launcher
mActionsView = findViewById(R.id.overview_actions_view);
((RecentsView) getOverviewPanel()).init(mActionsView);
if (FeatureFlags.ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(this)) {
if (isOverviewActionsEnabled()) {
// Overview is above all other launcher elements, including qsb, so move it to the top.
getOverviewPanel().bringToFront();
mActionsView.bringToFront();
mActionsView.updateVerticalMarginForNavModeChange(SysUINavigationMode.getMode(this));
}
}
private boolean isOverviewActionsEnabled() {
return FeatureFlags.ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(this);
}
public <T extends OverviewActionsView> T getActionsView() {
return (T) mActionsView;
}