From b088bd9c287d3201fd8719a4d54f2a2ca4689126 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Thu, 11 Jun 2020 13:50:41 -0700 Subject: [PATCH] Fix x translation for switch animation to overflow Bug: 135137761 Test: visual - select overflow, observe animation Change-Id: Ie01862d11a978f258438a1c1609c40a573c1db25 --- .../src/com/android/systemui/bubbles/BubbleStackView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index 001c740164e2e..088747badb0f0 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -1887,9 +1887,11 @@ public class BubbleStackView extends FrameLayout .withEndActions(this::releaseAnimatingOutBubbleBuffer) .start(); + boolean isOverflow = mExpandedBubble != null + && mExpandedBubble.getKey().equals(BubbleOverflow.KEY); float expandingFromBubbleDestinationX = - mExpandedAnimationController.getBubbleLeft( - mBubbleData.getBubbles().indexOf(mExpandedBubble)); + mExpandedAnimationController.getBubbleLeft(isOverflow ? getBubbleCount() + : mBubbleData.getBubbles().indexOf(mExpandedBubble)); mExpandedViewContainer.setAlpha(1f); mExpandedViewContainer.setVisibility(View.VISIBLE);