Esempio n. 1
0
  @SuppressWarnings({"rawtypes", "unchecked"})
  public void setDataAdapter(
      XListView xListView,
      KBaseAdapter adapter,
      List<?> showList,
      List resultlist,
      boolean isRefresh) {
    mRefreshTime = ToolUtils.getNowTime();
    xListView.setRefreshTime(mRefreshTime);
    stopLoad(xListView);

    if (null == resultlist || resultlist.size() == 0) {
      xListView.setPullLoadEnable(false);
      BToast.show(mActivity, "数据加载完毕");
      return;
    }

    if (resultlist.size() < PAGE_SIZE_ADD) {
      xListView.setPullLoadEnable(false);
      BToast.show(mActivity, "数据加载完毕");
    } else {
      xListView.setPullLoadEnable(true);
    }

    if (isRefresh) {
      showList.clear();
      isRefresh = false;
    }

    showList.addAll(resultlist);
    adapter.notifyDataSetChanged();
  }
Esempio n. 2
0
 @Override
 public void onTaskOver(HttpRequestInfo request, HttpResponseInfo info) {
   if (info.getState() == HttpTaskState.STATE_OK) {
     BaseNetWork bNetWork = info.getmBaseNetWork();
     if (bNetWork.getReturnCode() == ReturnCode.RETURNCODE_OK) {
       BToast.show(mActivity, "修改成功");
       final UserInfoBean ufb = BGApp.mUserBean;
       ufb.age = mAge;
       BGApp.mUserBean = ufb;
       finish();
     } else {
       BToast.show(mActivity, "修改失败");
     }
   }
 }
Esempio n. 3
0
package com.bgood.xn.ui.user.account;