@AfterViews void initBookmarkList() { dohandler(); listView.setPullRefreshEnable(true); // 设置下拉刷新 listView.setXListViewListener(newListViewListener); // 设置监听事件,重写两个方法 listView.setPullLoadEnable(true); // 设置上拉刷新 showByMyBaseAdapter(); }
@Override public void onLoadMore() { Log.e("", "加载更多"); // loadingDialog = ProgressDialog.show(DoctorVisitActivity.this, "", // "正在加载中……", // true, true); PageIndex = PageIndex + 1; read(); adapter.notifyDataSetChanged(); listView.stopRefresh(); listView.stopLoadMore(); }
@Override public void onRefresh() { Log.e("", "上拉刷新"); // loadingDialog = ProgressDialog.show(DoctorVisitActivity.this, "", // "正在加载中……", // true, true); // TODO Auto-generated method stub PageIndex = 1; read(); adapter.notifyDataSetChanged(); listView.stopRefresh(); listView.stopLoadMore(); Time t = new Time(); // or Time t=new Time("GMT+8"); 加上Time Zone资料。 t.setToNow(); // 取得系统时间。 xlistview_header_time.setText( (t.month + 1) + "月" + t.monthDay + "日" + t.hour + ":" + t.minute); }
public void showByMyBaseAdapter() { adapter = new DvAdapter(getActivity(), persons); listView.setAdapter(adapter); }