コード例 #1
0
  @Override
  public void onRequestFinished(String reqId) {

    if (reqId.equals(kREQ_ID_findUserAccountManagerDTOByUserId)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_updateImgInUserHomePage)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_bindQQAccount)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_bindWeiboAccount)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_bindWechatAccount)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }

    if (reqId.equals(kREQ_ID_unbindQQAccount)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_unbindWeiboAccount)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_unbindWechatAccount)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    if (reqId.equals(kREQ_ID_bindThirdPortrait)) {
      if (processDialog != null && processDialog.isShowing()) {
        processDialog.dismiss();
      }
    }
    // if (reqId.equals(kREQ_ID_findThirdImgURLDTOByUserId))
    // processDialog.dismiss();

  }
コード例 #2
0
 @Override
 protected void onResume() {
   // TODO Auto-generated method stub
   super.onResume();
   if (processDialog != null && processDialog.isShowing()) {
     processDialog.dismiss();
   }
 }
コード例 #3
0
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (processDialog != null && processDialog.isShowing()) {
      processDialog.dismiss();
    }
    // 拍照回调
    if (requestCode == Constants.REQUEST_CODE_TAKE_PHOTO
        || requestCode == Constants.REQUEST_CODE_GALLERY) {
      if (resultCode == RESULT_OK) {
        Uri photoUri = null;
        if (data == null) {
          photoUri = Uri.fromFile(getTempFile(this, null));
        } else {
          photoUri = data.getData();
        }
        Log.i(TAG, "crop photo data :" + photoUri);
        cropPhoto(photoUri);
      }

    } else if (requestCode == Constants.ACTION_IMAGE_CROP) {

      if (resultCode == RESULT_OK) {

        // 拿到剪切数据
        modifiedUserPhoto = data.getParcelableExtra("data");

        // 图像保存到文件中
        FileOutputStream foutput = null;
        try {
          File temp = getTempFile(this, "crop_temp.jpg");
          foutput = new FileOutputStream(temp);
          modifiedUserPhoto.compress(Bitmap.CompressFormat.JPEG, 100, foutput);
          //                    processDialog.show("请稍后...");
          modifyUserPhoto(temp.getPath());
        } catch (FileNotFoundException e) {
          e.printStackTrace();
        } finally {
          if (null != foutput) {
            try {
              foutput.close();
            } catch (IOException e) {
              e.printStackTrace();
            }
          }
        }
      }
    } else {
      // 第三方验证回调
      authHelper.setActivityResult(requestCode, resultCode, data);
    }
  }
コード例 #4
0
 @Override
 public void onRequestError(String reqID, Exception error) {
   if (processDialog != null && processDialog.isShowing()) {
     processDialog.dismiss();
   }
 }