Consistent portrait/landscape spacing

as temporary workaround for VirtualDisplay orientation change leaking
into SystemUI

Fixes: 148247663
Bug: 148675523
Test: manual - click into overflow, click bubble - no spacing change
Test: manual - expanded bubbles - rotate phone to landscape - no spacing change, bubbles left aligned
Change-Id: Ib17d84f5044cf6e4c8111385560bfc533fcad303
This commit is contained in:
Lyn Han
2020-01-31 10:43:19 -08:00
parent e2deab502f
commit 32d17f1438

View File

@@ -388,8 +388,11 @@ public class ExpandedAnimationController
mBubblesMaxRendered = res.getInteger(R.integer.bubbles_max_rendered);
// Includes overflow button.
float totalGapWidth = getWidthForDisplayingBubbles() - (mExpandedViewPadding * 2)
- (mBubblesMaxRendered + 1) * mBubbleSizePx;
// TODO(b/148675523) this is a temporary work around; change back once we have proper fix.
// float totalGapWidth = getWidthForDisplayingBubbles() - (mExpandedViewPadding * 2)
// - (mBubblesMaxRendered + 1) * mBubbleSizePx;
float totalGapWidth = getAvailableScreenWidth(true /* includeStableInsets */)
- (mExpandedViewPadding * 2) - (mBubblesMaxRendered + 1) * mBubbleSizePx;
mSpaceBetweenBubbles = totalGapWidth / mBubblesMaxRendered;
// Ensure that all child views are at 1x scale, and visible, in case they were animating