@Override public void onReqComplete(HttpResult result) { if (result.isOk()) { LoadingDialog.closeLoadingDialog(1000); adjacent = (Adjacent) result.getBaseData(); infoMgr.addPageData(adjacent.getPageInfo()); exListView.setPullLoadEnable(infoMgr.isHaveNextPage()); initListView(); } else { MMToast.showShort("请求失败"); LoadingDialog.closeLoadingDialog(1000); } }
@Override public void onFilterDialogItemClick(AdapterView<?> parent, View view, int position, long id) { ModuleMgr.getCfgMgr().setFloat("filterGender", position); // 存储该筛选配置 infoMgr.reset(); gender = position; ModuleMgr.getDiscoverMgr().reqSecAdjacent(gender, null, 1, this); LoadingDialog.show(this, "加载中"); }
private void initListView() { new Handler() .postDelayed( new Runnable() { @Override public void run() { exListView.stopRefresh(); exListView.stopLoadMore(); } }, 1000); // 刷新延时1s adapter.setList(infoMgr.getDatas()); if (adjacent.getPageInfo().getDatas() == null || adjacent.getPageInfo().getDatas().size() == 0) { statusListView.showNodata("附近10公里内还没有用户"); } else { statusListView.showExListView(); } }
@Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { UIShow.showOtherInfoActivity(this, infoMgr.getDatas().get(i - 1).getuId()); }
@Override public void onLoadMore() { ModuleMgr.getDiscoverMgr().reqSecAdjacent(gender, null, infoMgr.getNextPage(), this); }