来源:http://blog.csdn.net/sinat_18268881/article/details/51027735
https://github.com/jianghejie/XRecyclerView
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/lendListView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.jcodecraeer.xrecyclerview.XRecyclerView>
@BindView(R.id.lendListView) XRecyclerView lendListView;
lendListView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
new Handler().postDelayed(new Runnable(){
public void run() {
Log.d("提示","下拉刷新");
lendListView.refreshComplete();
}
}, 800);
}
@Override
public void onLoadMore() {
new Handler().postDelayed(new Runnable(){
public void run() {
Log.d("提示","上拉刷新");
lendListView.loadMoreComplete();
}
}, 800);
}
});