diff --git a/qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedScrollLayout.java b/qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedScrollLayout.java index 9a68c9f7..5ed0d1b3 100644 --- a/qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedScrollLayout.java +++ b/qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedScrollLayout.java @@ -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());