describe:
andorid RecyclerView pull down to refresh, pull up to load more
Run the screenshot:
use:
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView . setLayoutManager (layoutManager); mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { @Override public void onRefresh() { //refresh data here } @Override public void onLoadMore() { // load more data here } }); Original address: http://itbbu.com/archives/87