Merge "Fixed an issue where the contentHeight was wrong" into pi-dev
This commit is contained in:
@@ -2053,11 +2053,9 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getScrollRange() {
|
private int getScrollRange() {
|
||||||
int contentHeight = getContentHeight();
|
int scrollRange = Math.max(0, mContentHeight - mMaxLayoutHeight);
|
||||||
int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight);
|
|
||||||
int imeInset = getImeInset();
|
int imeInset = getImeInset();
|
||||||
scrollRange += Math.min(imeInset, Math.max(0,
|
scrollRange += Math.min(imeInset, Math.max(0, mContentHeight - (getHeight() - imeInset)));
|
||||||
getContentHeight() - (getHeight() - imeInset)));
|
|
||||||
return scrollRange;
|
return scrollRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2158,10 +2156,6 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getContentHeight() {
|
|
||||||
return mContentHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateContentHeight() {
|
private void updateContentHeight() {
|
||||||
int height = 0;
|
int height = 0;
|
||||||
float previousPaddingRequest = mPaddingBetweenElements;
|
float previousPaddingRequest = mPaddingBetweenElements;
|
||||||
@@ -2225,7 +2219,11 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mIntrinsicContentHeight = height;
|
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();
|
updateScrollability();
|
||||||
clampScrollPosition();
|
clampScrollPosition();
|
||||||
mAmbientState.setLayoutMaxHeight(mContentHeight);
|
mAmbientState.setLayoutMaxHeight(mContentHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user