When the list.size()==0,Not need to call setupMoreListener.
When I call setRefreshListener,
@Override
public void onRefresh() {
pageNumber = 1;
list.clear();
adapter.notifyDataSetChanged();
getFriendHttp();
}
Because I call "list.clear();adapter.notifyDataSetChanged();",So the list.size()==0,and will call setupMoreListener.
Normally,when I call refreshListener,it need not to call setupmorelistener.
private void processOnMore() { RecyclerView.LayoutManager layoutManager = mRecycler.getLayoutManager(); int lastVisibleItemPosition = getLastVisibleItemPosition(layoutManager); int visibleItemCount = layoutManager.getChildCount(); int totalItemCount = layoutManager.getItemCount();
When the list.size()==0,Not need to call setupMoreListener.
When I call setRefreshListener, @Override public void onRefresh() { pageNumber = 1; list.clear(); adapter.notifyDataSetChanged(); getFriendHttp(); } Because I call "list.clear();adapter.notifyDataSetChanged();",So the list.size()==0,and will call setupMoreListener.
Normally,when I call refreshListener,it need not to call setupmorelistener.