Fix bubble overflow position after rotating on larger screen

The code was passing the index of the bubble rather than the
actual position onscreen so the resulting translation was incorrect.

Test: manual - be on a large screen / tablet
             - expand bubbles, select the overflow
             - rotate the device
             => observe that the overflow container remains with
                the rest of the bubbles and doesn't jump around
Bug: 223911182
Change-Id: I95403f57e40e8c428ea9694e6fb93b0b0478c530
This commit is contained in:
Mady Mellor
2022-04-13 18:29:36 +00:00
parent 71163eeeb3
commit a74ed727df

View File

@@ -913,8 +913,10 @@ public class BubbleStackView extends FrameLayout
afterExpandedViewAnimation();
showManageMenu(mShowingManage);
} /* after */);
PointF p = mPositioner.getExpandedBubbleXY(getBubbleIndex(mExpandedBubble),
getState());
final float translationY = mPositioner.getExpandedViewY(mExpandedBubble,
getBubbleIndex(mExpandedBubble));
mPositioner.showBubblesVertically() ? p.y : p.x);
mExpandedViewContainer.setTranslationX(0f);
mExpandedViewContainer.setTranslationY(translationY);
mExpandedViewContainer.setAlpha(1f);