【文件属性】:
文件名称:PullToRefresh 上拉加载下拉刷新
文件大小:1.34MB
文件格式:RAR
更新时间:2018-12-24 08:21:58
Refresh
mPullToRefreshlistView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2() {
@Override
public void onPullDownToRefresh(PullToRefreshBase refreshView) {
Log.i("TAG", "onPullDownToRefresh");
new GetDataTask("PULLDOWN").execute();
}
@Override
public void onPullUpToRefresh(PullToRefreshBase refreshView) {
Log.i("TAG", "onPullUpToRefresh");
new GetDataTask("PULLUP").execute();
}
});
//设置PullRefreshListView上提加载时的加载提示
mPullToRefreshlistView.getLoadingLayoutProxy(false, true).setPullLabel("上拉加载...");
mPullToRefreshlistView.getLoadingLayoutProxy(false, true).setRefreshingLabel("正在加载...");
mPullToRefreshlistView.getLoadingLayoutProxy(false, true).setReleaseLabel("松开加载更多...");
// 设置PullRefreshListView下拉加载时的加载提示
mPullToRefreshlistView.getLoadingLayoutProxy(true, false).setPullLabel("下拉刷新...");
mPullToRefreshlistView.getLoadingLayoutProxy(true, false).setRefreshingLabel("正在刷新...");
mPullToRefreshlistView.getLoadingLayoutProxy(true, false).setReleaseLabel("松开刷新...");