diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/QSPanel.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSPanel.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index bdac7a0..626fc0d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -191,15 +191,23 @@ public class QSPanel extends ViewGroup { final int ch = record.row == 0 ? mLargeCellHeight : mCellHeight; record.tileView.measure(exactly(cw), exactly(ch)); } - final int actualHeight = rows == 0 ? 0 : getRowTop(rows); - mDetail.measure(exactly(width), exactly(actualHeight)); - setMeasuredDimension(width, actualHeight); + int h = rows == 0 ? 0 : getRowTop(rows); + mDetail.measure(exactly(width), unspecified()); + if (mDetail.getVisibility() == VISIBLE && mDetail.getChildCount() > 0) { + final int dmh = mDetail.getMeasuredHeight(); + if (dmh > 0) h = dmh; + } + setMeasuredDimension(width, h); } private static int exactly(int size) { return MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY); } + private static int unspecified() { + return MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); + } + @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { final int w = getWidth(); |