Open XiaoZhuiWang opened 2 years ago
在没有完全熟悉源码的情况下我自己修复了一下,把 moveSpinnerInfinitely()方法中的
if (mNestedInProgress && !mEnableLoadMoreWhenContentNotFull && spinner < 0) {
if (!mRefreshContent.canLoadMore()) {
/*
* 2019-1-22 修复 嵌套滚动模式下 mEnableLoadMoreWhenContentNotFull=false 无效的bug
*/
spinner = 0;
}
}
改为
if (mNestedInProgress && !mEnableLoadMoreWhenContentNotFull && spinner < 0) {
if (!mRefreshContent.canLoadMore() &&
!(mFooterNoMoreData && mRefreshFooter != null && mRefreshFooter.getView().getBottom() > thisView.getHeight())) {
/*
* 2019-1-22 修复 嵌套滚动模式下 mEnableLoadMoreWhenContentNotFull=false 无效的bug
*/
spinner = 0;
}
}
当设置EnableLoadMoreWhenContentNotFull=false,如果数据不足一个屏幕并且设置了NoMoreData=true时,当最后一条数据刚好显示在离屏幕底部一点点距离的地方,此时没有更多数据的Footer刚好就显示在屏幕外面去了,并且整个View不能滚动,导致Footer无法被滑到屏幕内。 布局是SmartRefreshLayout嵌套在CoordinatorLayout里面