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
This commit is contained in:
Jeremy Sim
2022-07-15 16:10:34 -07:00
parent 2765792793
commit d97cf8ad6e
@@ -205,7 +205,11 @@ public class OverviewActionsView<T extends OverlayUICallbacks> 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()) {