diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java index 83f68e81bca70..7be50c4ecc466 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java @@ -177,6 +177,13 @@ public class NotificationContentView extends FrameLayout { if (updateContractedHeaderWidth()) { mContractedChild.measure(widthMeasureSpec, heightSpec); } + if (mExpandedChild != null + && mContractedChild.getMeasuredHeight() > mExpandedChild.getMeasuredHeight()) { + // the Expanded child is smaller then the collapsed. Let's remeasure it. + heightSpec = MeasureSpec.makeMeasureSpec(mContractedChild.getMeasuredHeight(), + MeasureSpec.EXACTLY); + mExpandedChild.measure(widthMeasureSpec, heightSpec); + } } if (mHeadsUpChild != null) { int size = Math.min(maxSize, mHeadsUpHeight);