implementsXListView.IXListViewListener
xlistview1.setPullRefreshEnable(true);
xlistview1.setPullLoadEnable(true);
xlistview1.setXListViewListener(this);
//////////
adapter=new MyBaseAdapter();
xlistview1.setAdapter(adapter);
onRefresh(下拉)
onLoadMore(上拉)
、、、、、、、、、、、、、、、
///刷新
private Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
adapter.notifyDataSetChanged();
ColseXlist();
}
};
public void ColseXlist() {
xlistview1.stopLoadMore();
xlistview1.stopRefresh();
Date date =newDate();
DateFormat format =newSimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time = format.format(date);
xlistview1.setRefreshTime(time);
网友评论