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
diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
index 9b585fc..62ec0ef 100644
--- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
+++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
@@ -205,7 +205,11 @@
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()) {