diff options
| author | 2011-07-19 16:41:23 -0400 | |
|---|---|---|
| committer | 2011-07-19 16:41:23 -0400 | |
| commit | 942d92f68b427fb12e03e48bbf8f6c85857be097 (patch) | |
| tree | b86114c6fa48e231d9b137f92bf687100ed8e4ea | |
| parent | be4ad4ac66d6b4b878ed052975f7fb09af92c6d6 (diff) | |
Fix stacked notifications.
Bug: 5012006
Change-Id: I588f2b5376e644cbc37f884eec62ca44bac1dfaf
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java index 981fb240a247..b4d2a14ecb07 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java @@ -236,6 +236,7 @@ public class NotificationRowLayout extends ViewGroup { @Override public void onAnimationEnd(Animator animation) { mAppearingViews.remove(childF); + requestLayout(); // pick up any final changes in position } }); a.start(); @@ -274,6 +275,7 @@ public class NotificationRowLayout extends ViewGroup { NotificationRowLayout.super.removeView(childF); childF.setAlpha(1f); mDisappearingViews.remove(childF); + requestLayout(); // pick up any final changes in position } }); @@ -372,7 +374,7 @@ public class NotificationRowLayout extends ViewGroup { final int width = right - left; final int height = bottom - top; - //if (DEBUG) Slog.d(TAG, "onLayout: height=" + height); + if (DEBUG) Slog.d(TAG, "onLayout: height=" + height); final int count = getChildCount(); int y = 0; @@ -381,20 +383,22 @@ public class NotificationRowLayout extends ViewGroup { if (child.getVisibility() == GONE) { continue; } -// final int thisRowHeight = (int)( -// ((mAppearingViews.contains(child) || mDisappearingViews.contains(child)) -// ? child.getScaleY() -// : 1.0f) -// * mRowHeight); final int thisRowHeight = (int)(child.getAlpha() * mRowHeight); -// child.layout(0, y, width, y + thisRowHeight); - child.layout(0, y, width, y + mRowHeight); + if (DEBUG) { + Slog.d(TAG, String.format( + "laying out child #%d: (0, %d, %d, %d) h=%d", + i, y, width, y + thisRowHeight, thisRowHeight)); + } + child.layout(0, y, width, y + thisRowHeight); y += thisRowHeight; } + if (DEBUG) { + Slog.d(TAG, "onLayout: final y=" + y); + } } public void setForcedHeight(int h) { - //if (DEBUG) Slog.d(TAG, "forcedHeight: " + h); + if (DEBUG) Slog.d(TAG, "forcedHeight: " + h); if (h != mHeight) { mHeight = h; requestLayout(); |