@Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_add_contact);
   faceView = (UploadImgView) findViewById(R.id.faceImg);
   faceView.parentActivity = this;
   faceView.faceImgFileName = "" + System.currentTimeMillis() + ".jpg";
   faceView.uploadListener = this;
   ActivityHelper.initHeadInf(this);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_change_pwd);
    inputCurPwd = (EditText) findViewById(R.id.inputCurPwd);
    inputNewPwd = (EditText) findViewById(R.id.inputNewPwd);
    inputRepPwd = (EditText) findViewById(R.id.inputConfirmPwd);
    swShowPwd = (SwitchView) findViewById(R.id.switchShowPwd);
    laodView = findViewById(R.id.loadingLayoutInclude);
    cpwdClient =
        WebServiceHelper.createChangePwdClient(
            this,
            new WsCallBack() {
              @Override
              public void whenResponse(JSONObject json, Object... position) {
                Toast.makeText(ChangePwdActivity.this, "修改成功", Toast.LENGTH_SHORT).show();
                finish();
              }

              @Override
              public void whenError() {
                laodView.setVisibility(View.GONE);
              }

              @Override
              public void whenFail(JSONObject json) {
                laodView.setVisibility(View.GONE);
              }
            });

    swShowPwd.setOnStateChangedListener(
        new SwitchView.OnStateChangedListenersss() {
          @Override
          public void onChanged(boolean switchOn) {
            int type =
                switchOn
                    ? InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
                    : InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;
            inputCurPwd.setInputType(type);
            inputNewPwd.setInputType(type);
            inputRepPwd.setInputType(type);
          }
        });
    ActivityHelper.initHeadInf(this);
  }