diff options
| author | 2018-06-18 17:32:20 +0000 | |
|---|---|---|
| committer | 2018-06-18 17:32:20 +0000 | |
| commit | ed9df0d1761e186616bb8e174d04d6433d475c8b (patch) | |
| tree | 2d49cf028fe4eed4450971dc07e1e9c714d797d8 | |
| parent | 32066387e1ead357943e25ebccedcf0ed15b12a3 (diff) | |
| parent | f4b04ae0bb9a24faaaadb21c7e1c89e78a540fd0 (diff) | |
Merge "Fixed an issue where the contentHeight was wrong" into pi-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index fd481f2e2764..01ee7f1230af 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -2053,11 +2053,9 @@ public class NotificationStackScrollLayout extends ViewGroup } private int getScrollRange() { - int contentHeight = getContentHeight(); - int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight); + int scrollRange = Math.max(0, mContentHeight - mMaxLayoutHeight); int imeInset = getImeInset(); - scrollRange += Math.min(imeInset, Math.max(0, - getContentHeight() - (getHeight() - imeInset))); + scrollRange += Math.min(imeInset, Math.max(0, mContentHeight - (getHeight() - imeInset))); return scrollRange; } @@ -2158,10 +2156,6 @@ public class NotificationStackScrollLayout extends ViewGroup return count; } - public int getContentHeight() { - return mContentHeight; - } - private void updateContentHeight() { int height = 0; float previousPaddingRequest = mPaddingBetweenElements; @@ -2225,7 +2219,11 @@ public class NotificationStackScrollLayout extends ViewGroup } } mIntrinsicContentHeight = height; - mContentHeight = height + mTopPadding + mBottomMargin; + + // We don't want to use the toppadding since that might be interpolated and we want + // to take the final value of the animation. + int topPadding = mAmbientState.isFullyDark() ? mDarkTopPadding : mRegularTopPadding; + mContentHeight = height + topPadding + mBottomMargin; updateScrollability(); clampScrollPosition(); mAmbientState.setLayoutMaxHeight(mContentHeight); |