mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-17 04:31:16 +08:00
bugfix: error offsetRange if mBottomView == null
This commit is contained in:
+4
-1
@@ -440,9 +440,12 @@ public class QMUIContinuousNestedScrollLayout extends CoordinatorLayout implemen
|
||||
}
|
||||
|
||||
public int getOffsetRange() {
|
||||
if (mTopView == null || mBottomView == null) {
|
||||
if (mTopView == null && mBottomView == null) {
|
||||
return 0;
|
||||
}
|
||||
if(mBottomView == null){
|
||||
return Math.max(0, ((View) mTopView).getHeight() - getHeight());
|
||||
}
|
||||
int contentHeight = mBottomView.getContentHeight();
|
||||
if (contentHeight != IQMUIContinuousNestedBottomView.HEIGHT_IS_ENOUGH_TO_SCROLL) {
|
||||
return Math.max(0, ((View) mTopView).getHeight() + contentHeight - getHeight());
|
||||
|
||||
Reference in New Issue
Block a user