Fix x translation for switch animation to overflow

Bug: 135137761
Test: visual - select overflow, observe animation
Change-Id: Ie01862d11a978f258438a1c1609c40a573c1db25
This commit is contained in:
Mady Mellor
2020-06-11 13:50:41 -07:00
parent a4c3cd425b
commit b088bd9c28

View File

@@ -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);