Android-PullToRefreshRecyclerView icon indicating copy to clipboard operation
Android-PullToRefreshRecyclerView copied to clipboard

11楼说的问题!

Open chenzhiwei152 opened this issue 8 years ago • 0 comments

@Override public void onFinishLoading(boolean hasMoreItems, boolean needSetSelection) {

    if (getLayoutManager() == null) {
        return;
    }

    if (!hasMoreItems && mLoadMoreFooter != null) {
        //if it's last line, minus the extra height of loadmore

// mCurScroll = mCurScroll - mLoadMoreFooter.getLoadMorePadding(); // @2016/6/23 // 上拉再下拉再上拉,始终没有出现加载更多view的话,会多减一个rootview的高度,暂时先注释,或者是该方法onFinishLoading(true,false)第一个参数始终传值true }

    // if items is too short, don't show loadingview
    if (getLayoutManager().getItemCount() < mLoadMoreCount) {
        hasMoreItems = false;
    }

    setHasMoreItems(hasMoreItems);

    isLoading = false;

    if (needSetSelection) {
        int first = findFirstVisibleItemPosition();
        mRecyclerView.scrollToPosition(--first);
    }
}

chenzhiwei152 avatar Jun 23 '16 02:06 chenzhiwei152