Example #1
0
  private void initData() {

    // 密码(未加密)
    mUserName = AppContext.getInstance()._userName;
    mPassword = AppContext.getInstance()._userPsd;
    boolean isLogin = AppContext.getInstance()._autoLogin;

    metAccount.setText(StringUtils.isEmpty(mUserName) ? "" : mUserName);
    metPassword.setText(StringUtils.isEmpty(mPassword) ? "" : mPassword);

    mcbAutoLogin.setChecked(isLogin);
  }
Example #2
0
  private boolean checkValue() {
    String msg = "";

    if (StringUtils.isEmpty(mUserName)) {
      msg = getString(R.string.login_check_account);
      // metAccount.setError("");
      metAccount.requestFocus();
      UIHelper.ToastMessage(getApplicationContext(), msg);
      return false;
    }

    if (StringUtils.isEmpty(mPassword)) {
      msg = getString(R.string.login_check_password);

      // metPassword.setError("");
      metPassword.requestFocus();
      UIHelper.ToastMessage(getApplicationContext(), msg);
      return false;
    }

    return true;
  }