首先实现XRecyclerView会生成两个方法
在initView写上
//加载更多
xrv1.setLoadingMoreEnabled(true);
//加载刷新监听
xrv1.setLoadingListener(this);
生成的方法
@Override
public void onRefresh() {
//停止刷新
xrv1.refreshComplete();
}
@Override
public void onLoadMore() {
xrv1.loadMoreComplete();
Toast.makeText(MainActivity.this,"已无更多数据",Toast.LENGTH_SHORT).show();
}