Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88323dfa authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue where notifications wouldn't animate on height change

When switching between templates, the old intrinsic height was 0
before the layout, which suppressed the height animation. We're now
also animating if the previous height was 0 but the view already
had a height.

Fixes: 187979400
Test: add gmail notification, archive, observe animation
Change-Id: I3fa2edf9a39b586a685a96f89a74ead597143981
parent b3db2879
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2482,7 +2482,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        int intrinsicBefore = getIntrinsicHeight();
        super.onLayout(changed, left, top, right, bottom);
        if (intrinsicBefore != getIntrinsicHeight() && intrinsicBefore != 0) {
        if (intrinsicBefore != getIntrinsicHeight()
                && (intrinsicBefore != 0 || getActualHeight() > 0)) {
            notifyHeightChanged(true  /* needsAnimation */);
        }
        if (mMenuRow != null && mMenuRow.getMenuView() != null) {