From a24c341b521c070ca082913f10db3bf35b00deb0 Mon Sep 17 00:00:00 2001 From: Becky Qiu Date: Thu, 9 Apr 2020 14:10:03 -0700 Subject: [PATCH] [Overview Actions] Update the actions container UI. Make the overview actions container not limited by the taskview any more, and add left and right margin as 16dp to it. Screenshot: https://hsv.googleplex.com/5938979251683328 Test: local Bug: 153591867 Change-Id: I8056105fe4c03311e473bb317cba345048ec2203 --- .../src/com/android/quickstep/views/RecentsView.java | 8 +++++--- quickstep/res/values/dimens.xml | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 3e88ecb560..b46d6f6491 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -2139,13 +2139,15 @@ public abstract class RecentsView extends PagedView impl && SysUINavigationMode.removeShelfFromOverview(mActivity)) { mActionsView = ((ViewGroup) getParent()).findViewById(R.id.overview_actions_view); if (mActionsView != null) { - Rect rect = new Rect(); - getTaskSize(rect); InsettableFrameLayout.LayoutParams layoutParams = - new InsettableFrameLayout.LayoutParams(rect.width(), + new InsettableFrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, getResources().getDimensionPixelSize( R.dimen.overview_actions_height)); layoutParams.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL; + int margin = getResources().getDimensionPixelSize( + R.dimen.overview_actions_horizontal_margin); + layoutParams.setMarginStart(margin); + layoutParams.setMarginEnd(margin); mActionsView.setLayoutParams(layoutParams); showActionsView(); } diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index 6d8d54f389..9a61165c40 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -25,6 +25,7 @@ 110dp + 16dp 10dp 70dp