예제 #1
0
  public void resgisteringUserData(View v) {
    String value_name = name.getText().toString();
    String value_email_id = email_id.getText().toString();
    String value_mobile_no = mobile_no.getText().toString();
    String value_username = username.getText().toString();
    String value_password = password.getText().toString();
    String value_confirm_password = confirm_password.getText().toString();

    if (ReuseableClass.haveNetworkConnection(RegisterActivity.this)) {
      if (value_name.trim().equalsIgnoreCase("")
          || value_email_id.trim().equalsIgnoreCase("")
          || value_mobile_no.trim().equalsIgnoreCase("")
          || value_username.trim().equalsIgnoreCase("")
          || value_password.trim().equalsIgnoreCase("")
          || value_confirm_password.trim().equalsIgnoreCase("")) {
        Toast.makeText(this, R.string.all_field_mandatory, Toast.LENGTH_SHORT).show();
      } else {
        if (value_password.equalsIgnoreCase(value_confirm_password)) {
          dialog = new ProgressDialog(RegisterActivity.this);
          dialog.setMessage(RegisterActivity.this.getString(R.string.wait_a_min_dialog_message));
          dialog.show();

          new UserRegistrationTask()
              .execute(value_name, value_email_id, value_mobile_no, value_username, value_password);
        } else {
          Toast.makeText(this, R.string.password_missmatch_error, Toast.LENGTH_SHORT).show();
        }
      }
    } else {
      Toast.makeText(this, R.string.check_network, Toast.LENGTH_SHORT).show();
    }
  }
예제 #2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.registration_activity);

    textViewTitle = (TextView) findViewById(R.id.textViewTitle);
    name = (EditText) findViewById(R.id.editTextName);
    email_id = (EditText) findViewById(R.id.editTextEmailAddress);
    mobile_no = (EditText) findViewById(R.id.editTextMobileNo);
    username = (EditText) findViewById(R.id.editTextUsername);
    password = (EditText) findViewById(R.id.editTextPassword);
    confirm_password = (EditText) findViewById(R.id.editTextConfirmPassword);

    name.setTypeface(ReuseableClass.getFontStyle(this));
    email_id.setTypeface(ReuseableClass.getFontStyle(this));
    mobile_no.setTypeface(ReuseableClass.getFontStyle(this));
    username.setTypeface(ReuseableClass.getFontStyle(this));
    password.setTypeface(ReuseableClass.getFontStyle(this));
    confirm_password.setTypeface(ReuseableClass.getFontStyle(this));
    ((Button) findViewById(R.id.buttonRegister)).setTypeface(ReuseableClass.getFontStyle(this));

    textViewTitle.setTypeface(ReuseableClass.getFontStyle(RegisterActivity.this));
  }