public boolean shouldHandleLoadingMore() { if (mRefreshLayout == null) { return false; } if (mDirectNormalView != null) { return true; } if (ScrollingUtil.isWebViewToBottom(mDirectWebView)) { return true; } if (ScrollingUtil.isScrollViewToBottom(mDirectScrollView)) { return true; } if (mDirectAbsListView != null) { return mRefreshLayout.shouldHandleAbsListViewLoadingMore(mDirectAbsListView); } if (mDirectRecyclerView != null) { return mRefreshLayout.shouldHandleRecyclerViewLoadingMore(mDirectRecyclerView); } if (mDirectViewPager != null) { if (mNestedContentView == null) { regetNestedContentView(); } if (mNestedNormalView != null) { return true; } if (ScrollingUtil.isWebViewToBottom(mNestedWebView)) { return true; } if (ScrollingUtil.isScrollViewToBottom(mNestedScrollView)) { return true; } if (mNestedAbsListView != null) { return mRefreshLayout.shouldHandleAbsListViewLoadingMore(mNestedAbsListView); } if (mNestedRecyclerView != null) { return mRefreshLayout.shouldHandleRecyclerViewLoadingMore(mNestedRecyclerView); } } return false; }
/** * 是否满足处理刷新的条件 * * @return */ private boolean shouldHandleLoadingMore() { if (mIsLoadingMore || mCurrentRefreshStatus == RefreshStatus.REFRESHING || mLoadMoreFooterView == null || mDelegate == null) { return false; } // 内容是普通控件,满足 if (mNormalView != null) { return true; } if (ScrollingUtil.isWebViewToBottom(mWebView)) { return true; } if (ScrollingUtil.isScrollViewToBottom(mScrollView)) { return true; } if (mAbsListView != null) { return shouldHandleAbsListViewLoadingMore(mAbsListView); } if (mRecyclerView != null) { return shouldHandleRecyclerViewLoadingMore(mRecyclerView); } if (mStickyNavLayout != null) { return mStickyNavLayout.shouldHandleLoadingMore(); } return false; }