@Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (resultCode == RESULT_OK) {
     switch (requestCode) {
       case REQUEST_TO_PLACE_PICKER:
         List<String> list =
             data == null
                 ? null
                 : data.getStringArrayListExtra(PlacePickerWindow.RESULT_PLACE_LIST);
         if (list == null || list.size() < 2) {
           CommonUtil.showShortToast(context, "请先选择地址哦~");
           CommonUtil.toActivity(
               context,
               PlacePickerWindow.createIntent(context, packageName, 2),
               REQUEST_TO_PLACE_PICKER,
               false);
           return;
         }
         String place = "";
         for (String s : list) {
           place += s;
         }
         tvEditTextInfoPlace.setText(place);
         break;
       default:
         break;
     }
   }
 }
  @Override
  public void initData() { // 必须调用
    super.initData();

    intent = getIntent();
    packageName = intent.getStringExtra(INTENT_PACKAGE_NAME);

    intentType = intent.getIntExtra(INTENT_TYPE, 0);
    if (StringUtil.isNotEmpty(intent.getStringExtra(INTENT_KEY), true)) {
      tvEditTextInfoTitle.setText(StringUtil.getCurrentString());
    }
    etEditTextInfo.setSingleLine(intentType != TYPE_NOTE);

    switch (intentType) {
      case TYPE_NICK:
        MaxLen = 20;
        break;
      case TYPE_PHONE:
        etEditTextInfo.setInputType(InputType.TYPE_CLASS_PHONE);
        MaxLen = 11;
        break;
      case TYPE_EMAIL:
        etEditTextInfo.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
        MaxLen = 60;
        break;
      case TYPE_WEBSITE:
        etEditTextInfo.setInputType(InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT);
        MaxLen = 60;
        break;
      case TYPE_MAILADDRESS:
        MaxLen = 60;
        break;
      case TYPE_PROFESSION:
        tvEditTextInfoRemind.setText("所属行业");
        MaxLen = 15;
      case TYPE_NOTE:
        MaxLen = 100;
        break;
      default:
        MaxLen = 30;
        break;
    }
    etEditTextInfo.setMaxEms(MaxLen);
    tvEditTextInfoRemind.setText("限" + MaxLen / 2 + "个字(或" + MaxLen + "个字符)");

    if (intentType == TYPE_MAILADDRESS || intentType == TYPE_USUALADDRESS) {
      tvEditTextInfoPlace.setVisibility(View.VISIBLE);
      CommonUtil.toActivity(
          context,
          PlacePickerWindow.createIntent(context, packageName, 2),
          REQUEST_TO_PLACE_PICKER,
          false);
    }
  }
 @Override
 public void onClick(View v) {
   if (v.getId() == R.id.tvEditTextInfoReturn) {
     finish();
   } else if (v.getId() == R.id.tvEditTextInfoForward) {
     saveAndExit();
   } else if (v.getId() == R.id.tvEditTextInfoPlace) {
     CommonUtil.toActivity(
         context,
         PlacePickerWindow.createIntent(context, packageName, 2),
         REQUEST_TO_PLACE_PICKER,
         false);
   }
 }