Exemplo n.º 1
0
  private void registByPhone() {
    String phone = phone_edit.getText().toString();
    if (TextUtils.isEmpty(phone)) {
      phone_edit.setError(getString(R.string.nullcontentnotice));
      phone_edit.requestFocus();
      return;
    } else if (!PhoneInfoUtils.isPhoneNum(phone)) {
      phone_edit.setError(getString(R.string.phone_notice_));
      phone_edit.requestFocus();
      return;
    }

    String passwordostr = passWordo.getText().toString();
    String passwordtstr = passWordt.getText().toString();
    if (TextUtils.isEmpty(passwordostr)) {
      passWordo.setError(getString(R.string.nullcontentnotice));
      passWordo.requestFocus();
      return;
    }

    if (!passwordostr.equals(passwordtstr)) {
      passWordt.setError(getString(R.string.password_notice_t));
      passWordt.requestFocus();
      return;
    }

    HealthHttpClient.registerByphone(phone, MD5.MD5jm(passwordtstr), handler);
  }
Exemplo n.º 2
0
 @Override
 public void initData() {
   // TODO Auto-generated method stub
   try {
     phone_edit.setText("" + PhoneInfoUtils.getPhoneNumCut86(context));
   } catch (Exception e) {
     // TODO: handle exception
   }
 }