Reorder bubbles without animations on collapse
Fixes: 180045233
Test: select different bubble while expanded, collapse stack
=> see that newly selected bubble is on top of stack
=> no weird animations like in b/178499353
Change-Id: I6d95763a4dd08fd8d1e30dd93131ff27b4fd7c2c
This commit is contained in:
@@ -1539,19 +1539,16 @@ public class BubbleStackView extends FrameLayout
|
||||
* Update bubble order and pointer position.
|
||||
*/
|
||||
public void updateBubbleOrder(List<Bubble> bubbles) {
|
||||
if (isExpansionAnimating()) {
|
||||
return;
|
||||
}
|
||||
final Runnable reorder = () -> {
|
||||
for (int i = 0; i < bubbles.size(); i++) {
|
||||
Bubble bubble = bubbles.get(i);
|
||||
mBubbleContainer.reorderView(bubble.getIconView(), i);
|
||||
}
|
||||
};
|
||||
if (mIsExpanded) {
|
||||
if (mIsExpanded || isExpansionAnimating()) {
|
||||
reorder.run();
|
||||
updateBadgesAndZOrder(false /* setBadgeForCollapsedStack */);
|
||||
} else {
|
||||
} else if (!isExpansionAnimating()) {
|
||||
List<View> bubbleViews = bubbles.stream()
|
||||
.map(b -> b.getIconView()).collect(Collectors.toList());
|
||||
mStackAnimationController.animateReorder(bubbleViews, reorder);
|
||||
|
||||
Reference in New Issue
Block a user