Fix the dot not showing when it should
* Sometimes the dot doesn't show when it should, this was happening
because the mAfterFlyoutHidden might not be set for updates
to the flyout
Test: manual 1) add a new bubble, before the flyout for it has
animated away, add a second bubble, before 2nd
bubble's flyout as animated away, add another update
to it
2) wait for the flyout to animate away, ensure the
update dot is visible
Bug: 185438888
Change-Id: I7e21ee87cb2ad02871330178668bc07962485e2d
This commit is contained in:
@@ -231,7 +231,8 @@ public class BubbleFlyoutView extends FrameLayout {
|
||||
* Fade animation for consecutive flyouts.
|
||||
*/
|
||||
void animateUpdate(Bubble.FlyoutMessage flyoutMessage, float parentWidth, PointF stackPos,
|
||||
boolean hideDot) {
|
||||
boolean hideDot, Runnable onHide) {
|
||||
mOnHide = onHide;
|
||||
final Runnable afterFadeOut = () -> {
|
||||
updateFlyoutMessage(flyoutMessage, parentWidth);
|
||||
// Wait for TextViews to layout with updated height.
|
||||
|
||||
@@ -2401,7 +2401,8 @@ public class BubbleStackView extends FrameLayout
|
||||
|
||||
if (mFlyout.getVisibility() == View.VISIBLE) {
|
||||
mFlyout.animateUpdate(bubble.getFlyoutMessage(), getWidth(),
|
||||
mStackAnimationController.getStackPosition(), !bubble.showDot());
|
||||
mStackAnimationController.getStackPosition(), !bubble.showDot(),
|
||||
mAfterFlyoutHidden /* onHide */);
|
||||
} else {
|
||||
mFlyout.setVisibility(INVISIBLE);
|
||||
mFlyout.setupFlyoutStartingAsDot(bubble.getFlyoutMessage(),
|
||||
@@ -2409,7 +2410,7 @@ public class BubbleStackView extends FrameLayout
|
||||
mStackAnimationController.isStackOnLeftSide(),
|
||||
bubble.getIconView().getDotColor() /* dotColor */,
|
||||
expandFlyoutAfterDelay /* onLayoutComplete */,
|
||||
mAfterFlyoutHidden,
|
||||
mAfterFlyoutHidden /* onHide */,
|
||||
bubble.getIconView().getDotCenter(),
|
||||
!bubble.showDot(),
|
||||
mPositioner);
|
||||
|
||||
Reference in New Issue
Block a user