Fix bubble translation x when bar is collapsed
Previously the translation x value for bubbles when the bar is
collapsed and on the right was 0 for the first bubble and some
fixed value for the rest of the bubbles. But if only 1 bubble
is visible when the bar is collapsed, as in the case when there
is only 1 bubble and the overflow, this ends up pushing the
overflow too far to the right.
This change updates the translation x value for bubbles when the
bar is collapsed and on the right, so that if only 1 bubble is
visible when collapsed, all bubbles have tx 0, otherwise if 2
bubbles are visible, the first has tx 0 and the rest have the same
tx value.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 350962159
Test: manual
- Add 1 bubble to the bubble bar
- Make sure bubble bar is on the right
- Expand and collapse the bar
- Observe the overflow tx value is correct during the animation
Change-Id: I8401d70fa6f374ace58d9cdbe3302e39e7aedc70
1 file changed