コード例 #1
0
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.title_back_layout:
        finish();
        break;
        // 提交
      case R.id.title_call_layout:
        int id = radioGroup.getCheckedRadioButtonId();
        if (id == R.id.satisfied_1) {
          // 满意
          level = Constants.PROPERTY_PRAISE;
          reqEvaluate();
        } else if (id == R.id.commonly_2) {
          // 一般
          level = Constants.PROPERTY_COMPLAINT;
          reqEvaluate();
        } else if (id == R.id.unsatisfy_3) {
          // 不满意
          level = Constants.PROPERTY_REPAIR;
          if (GeneralUtils.isNotNullOrZeroLenght(editText.getText().toString().trim())) {
            reqEvaluate();
          } else {
            Toast.makeText(EvaluationActivity.this, "请填写不满意的原因,方便我们重新处理", Toast.LENGTH_SHORT)
                .show();
          }
        } else {
          Toast.makeText(EvaluationActivity.this, "请选择满意度", Toast.LENGTH_SHORT).show();
        }

        break;
      case R.id.circle_post_pick_lyt:
        // 添加图片
        addImgDiaLog(createPopDiaLog(), 0);
        break;
      case R.id.repair_grid_view:
        break;
      case R.id.circle_post_img_del:
        // 删除
        int index = (Integer) v.getTag();
        adapter.setNotifyPosition(index - 1);
        imgList.remove(index);
        syncListThumb();
      default:
        break;
    }
  }
コード例 #2
0
 @Override
 public void netBack(Object ob) {
   commitLoading.dismissDialog();
   if (ob != null) {
     if (ob instanceof BaseResponse) {
       BaseResponse resp = (BaseResponse) ob;
       titleBarRight.setEnabled(true);
       if (GeneralUtils.isNotNullOrZeroLenght(resp.getRetcode())) {
         if (Constants.SUCESS_CODE.equals(resp.getRetcode())) {
           Toast.makeText(EvaluationActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
           setResult(RESULT_OK);
           finish();
         } else {
           ToastUtil.makeText(EvaluationActivity.this, resp.getRetinfo());
         }
       } else {
         ToastUtil.showError(EvaluationActivity.this);
       }
     }
   }
 }