コード例 #1
0
  @Override
  protected void onPostExecute(Result result) {
    super.onPostExecute(result);
    if (result != null) {
      if (result.getStatus().equals("0")) {
        UIHelper.ToastMessage(context, typeDesc + "已删除");
        if (taskCallBack != null) {
          taskCallBack.onTaskFinshed();
        }

        // 如果是从 启动的,删除后,回到最新回复列表页面
        if (context.getClass().isAssignableFrom(NewCommentsDetailActivity.class)) {
          ((BaseActivity) context).finish();
          ((BaseActivity) context).backAnim();
        }
      } else {
        UIHelper.ToastMessage(context, result.getStatusMessage());
        return;
      }
    } else {
      if (null != e) {
        e.makeToast(context);
      }
      return;
    }
  }
コード例 #2
0
 @Override
 protected void onPostExecute(BabyInfoList result) {
   // TODO Auto-generated method stub
   super.onPostExecute(result);
   closeProgressDialog();
   if (null != result) {
     if (result.getStatus().equals("0")) {
       list = result.getBabyInfoList();
       if (list == null || list.size() == 0) {
         UIHelper.ToastMessage(context, "您还没有添加宝宝信息");
         // BabyInfoListActivity.this.finish();
         // backAnim();
         return;
       }
       showProgressDialog(context, "", getResources().getString(R.string.load_ing));
       current_position = 0;
       // 加载第一个宝宝的默认信息
       new GetupdateBabyTask()
           .execute(
               list.get(0).getChildId(),
               AppContext.getApp().getUserLoginSharedPre().getUserInfo().getUserId(),
               "");
     } else {
       UIHelper.ToastMessage(context, result.getStatusMessage());
       return;
     }
   } else {
     if (null != e) {
       e.makeToast(context);
     }
     return;
   }
 }
コード例 #3
0
    // 这个方法可以执行UI线程里操作界面的东西,类似于new handler里面的东东
    @Override
    protected void onPostExecute(DynamicTeacherList result) {

      super.onPostExecute(result);

      if (result != null) {

        if (result.getStatus().equals("0")) {
          dynamicCount = Integer.parseInt(dynamicTeacherList.getDataCount());
          if (list != null && list.size() > 0) {

            list.addAll(result.getDynamicTeacherList());
          } else {
            list = result.getDynamicTeacherList();
          }
          if (dynamicCount == 0) {
            mPullListView.setHasData(false);
            // listview每行间隔
            mListView.setDividerHeight(0);

            dynamicTeacherAdapter =
                new ListViewDynamicTeacherAdapter(InSchoolDynamicTeacherActivity.this, list);
            // 得到实际的ListView
            mListView.setAdapter(dynamicTeacherAdapter);
            mPullListView.onPullDownRefreshComplete();
            mPullListView.onPullUpRefreshComplete();
            return;
          } else if (dynamicCount == 1) {
            mListView.setDivider(null);
            mListView.setDividerHeight(0);
          }
          if (list.size() <= Constant.LOADDATACOUNT) {
            dynamicTeacherAdapter =
                new ListViewDynamicTeacherAdapter(InSchoolDynamicTeacherActivity.this, list);
            // 得到实际的ListView
            mListView.setAdapter(dynamicTeacherAdapter);
          } else {
            dynamicTeacherAdapter.notifyDataSetChanged();
          }

        } else {
          UIHelper.ToastMessage(context, result.getStatusMessage());
          return;
        }
      } else {
        mPullListView.onPullDownRefreshComplete();
        mPullListView.onPullUpRefreshComplete();
        if (null != e) {
          e.makeToast(context);
        }
        return;
      }

      mPullListView.onPullDownRefreshComplete();
      mPullListView.onPullUpRefreshComplete();
      mPullListView.setHasMoreData(hasMoreData);
      setLastUpdateTime();
    }
コード例 #4
0
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.title_iv_left:
        doBack();
        break;
      case R.id.title_iv_more:
        showPopupWindow(title_iv_more, current_position);
        break;
      case R.id.rl_title_center:
        if (null != list && list.size() > 0) {
          showPopupWindow(rl_title_center);
        } else {
          UIHelper.ToastMessage(context, "您还没有添加宝宝信息");
          // BabyInfoListActivity.this.finish();
          // backAnim();
          return;
        }

        break;
      case R.id.rl_myepei_babyinfo:
        if (babyInfoDetail != null) {
          Intent intent_babyinfodetail = new Intent(context, BabyInfoDetailActivity.class);
          intent_babyinfodetail.putExtra("babyInfoDetail", babyInfoDetail);
          startActivityForResult(intent_babyinfodetail, Constant.REQUSTCONDE_BABYINFO_CATLIST);
          intoAnim();
        }
        break;
      case R.id.rl_myepei_personinfo_babyinfo_count:
        if (babyInfoDetail != null
            && babyInfoDetail.getOrgCount() != null
            && babyInfoDetail.getOrgCount() > 0) {
          Intent intent_babyinfoorg = new Intent(context, BabyinfoOrgListActivity.class);
          intent_babyinfoorg.putExtra("babyInfoDetail", babyInfoDetail);
          startActivityForResult(intent_babyinfoorg, Constant.REQUSTCONDE_BABYINFO_CATLIST);
          intoAnim();
        } else {
          UIHelper.ToastMessage(context, "该宝宝未加入任何教育机构");
        }
        break;
      default:
        break;
    }
  }
コード例 #5
0
    // 这个方法可以执行UI线程里操作界面的东西,类似于new handler里面的东东
    @Override
    protected void onPostExecute(Result result) {

      super.onPostExecute(result);

      if (result != null) {
        if (result.getStatus().equals("0")) {
          UIHelper.ToastMessage(context, "删除成功", Toast.LENGTH_SHORT);
          // 加载宝宝信息列表
          showProgressDialog(context, "", getResources().getString(R.string.load_ing));
          new GetBabyListTask().execute(AppContext.getApp().getToken());
        } else {
          UIHelper.ToastMessage(context, result.getStatusMessage());
          return;
        }
      } else {
        if (null != e) {
          e.makeToast(context);
        }
        return;
      }
    }
コード例 #6
0
    @Override
    protected void onPostExecute(BabyInfoDetail result) {
      // TODO Auto-generated method stub
      super.onPostExecute(result);
      closeProgressDialog();
      if (null != result) {
        if (result.getStatus().equals("0")) {
          showPicture(result.getPhotoPath(), iv_myepei_personinfo_pic, options);
          tv_myepei_babyinfo_name.setText(result.getName());
          tv_myepei_babyinfo_age.setText(
              TextUtils.isEmpty(result.getAge()) || result.getAge().equals("0")
                  ? ""
                  : result.getAge() + "岁");
          if (result.getSex().equals("0")) {
            iv_myepei_babyinfo_sex.setImageResource(R.drawable.sex_female);
          }
          if (result.getSex().equals("1")) {
            iv_myepei_babyinfo_sex.setImageResource(R.drawable.sex_man);
          }
          tv_myepei_babyinfo_nickname.setText(result.getNickName());
          tv_myepei_babyinfo_birthdate.setText(result.getBirthDate());
          StringBuffer buffString = new StringBuffer();
          for (InterestPri interestPri : babyInfoDetail.getInterestPriList()) {
            for (InterestSec interestSec : interestPri.getInterestSecList()) {

              buffString.append(interestSec.getItemName() + ",");
            }
          }
          String buffStr = buffString.toString();
          if (buffStr.endsWith(",")) {
            buffStr = buffStr.substring(0, buffStr.length() - 1);
          }
          tv_myepei_babyinfo_cats.setText(buffStr);
          if (result.getOrgCount() != null && result.getOrgCount() > 0) {
            tv_myepei_babyinfo_count.setText("(" + result.getOrgCount() + ")");
          } else {
            tv_myepei_babyinfo_count.setText("");
          }
        } else {
          UIHelper.ToastMessage(context, result.getStatusMessage());
          return;
        }
      } else {
        if (null != e) {
          e.makeToast(context);
        }
        return;
      }
    }
コード例 #7
0
    @Override
    protected void onPostExecute(ValidUserResult result) {
      // TODO Auto-generated method stub
      super.onPostExecute(result);
      closeProgressDialog();
      if (null == result) {
        if (null != e) {
          e.makeToast(context);
        }
        return;

      } else {
        if (result.getStatus().equals("0")) {
          new SendCodeTask().execute(result.getKey(), "mobile");
        } else {
          UIHelper.ToastMessage(context, result.getStatusMessage());
          return;
        }
      }
    }
コード例 #8
0
 @Override
 protected void onPostExecute(Result result) {
   // TODO Auto-generated method stub
   super.onPostExecute(result);
   if (null != progress) {
     progress.dismiss();
   }
   if (null == result) {
     if (null != e) {
       e.makeToast(context);
     }
     return;
   } else {
     if (result.getStatus().equals("0")) {
       Intent intent = new Intent(context, ForgetPasswordStep2Activity.class);
       intent.putExtra("ValidUserResult", validUserResult);
       startActivity(intent);
       intoAnim();
     } else {
       UIHelper.ToastMessage(context, result.getStatusMessage());
       return;
     }
   }
 }