Permalink
Browse files

Fix wrong peek height of the notification panel

From N, the topmost notification slides in expanded from the top, not collapsed.
(https://android.googlesource.com/platform/frameworks/base/+/d1ad9ab3121cb54387c5d2b71b48708dcaed5c43)
But when peek from status bar, the peek height was measured with collapsed height.
Therefore fix the peek height with expanded height of the topmost notification.

Test: manual - Test peeking from status bar with expandable topmost notification.
Change-Id: I46173c9e82a1221b543133c38ec6aaf746244011
  • Loading branch information...
Dong-wan authored and akhilnarang committed Dec 30, 2016
1 parent 6770377 commit 031b8a6ffee9aae330be92996bd55dfd07f65986
@@ -782,7 +782,7 @@ private int getLayoutHeight() {
public int getFirstItemMinHeight() {
final ExpandableView firstChild = getFirstChildNotGone();
return firstChild != null ? firstChild.getMinHeight() : mCollapsedSize;
return firstChild != null ? firstChild.getIntrinsicHeight() : mCollapsedSize;
}
public int getBottomStackPeekSize() {
@@ -2224,10 +2224,7 @@ public float getTopPaddingOverflow() {
}
public int getPeekHeight() {
final ExpandableView firstChild = getFirstChildNotGone();
final int firstChildMinHeight = firstChild != null ? firstChild.getCollapsedHeight()
: mCollapsedSize;
return mIntrinsicPadding + firstChildMinHeight + mBottomStackPeekSize
return mIntrinsicPadding + getFirstItemMinHeight() + mBottomStackPeekSize
+ mBottomStackSlowDownHeight;
}

0 comments on commit 031b8a6

Please sign in to comment.