From d97cf8ad6e9cd3be5dfb63df57a0107bde497d22 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Fri, 15 Jul 2022 16:10:34 -0700 Subject: [PATCH] Fix small bug with Overview action button placement Overview actions will now be centered properly when 3-button nav is active on tablets in landscape. On most tablet and foldable screens, we shift the Overview action buttons left to accommodate when 3-button nav is active. The only exception is large-screen tablets in landscape orientation, where there is enough room to center them. This patch adds a conditional for that case. Fixes: 239247432 Test: Manual Change-Id: I96f9d5e428273b0611463a1f0f5898910eefe5ce --- .../com/android/quickstep/views/OverviewActionsView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java index 9b585fcf8b..62ec0ef1df 100644 --- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java @@ -205,7 +205,11 @@ public class OverviewActionsView extends FrameLayo if (mDp == null) { return; } - if (mDp.areNavButtonsInline) { + boolean largeScreenLandscape = mDp.isTablet && !mDp.isTwoPanels && mDp.isLandscape; + // If in 3-button mode, shift action buttons to accommodate 3-button layout. + // (Special exception for landscape tablets, where there is enough room and we don't need to + // shift the action buttons.) + if (mDp.areNavButtonsInline && !largeScreenLandscape) { // Add extra horizontal spacing int additionalPadding = mDp.hotseatBarEndOffset; if (isLayoutRtl()) {