Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- btnRegister.setOnClickListener(new View.OnClickListener(){
- public void onClick(View v) {
- String userName = editTextName.getText().toString();
- String email = editTextEmail.getText().toString();
- String password = editTextPassword.getText().toString();
- String confirmPassword = editTextConfirmPassword.getText()
- .toString();
- if (userName.equals("")|| email.equals("") || password.equals("")
- || confirmPassword.equals("")) {
- Toast.makeText(getApplicationContext(), "Field Vaccant",
- Toast.LENGTH_LONG).show();
- return;
- }
- if (!password.equals(confirmPassword)) {
- Toast.makeText(getApplicationContext(),
- "Password does not match", Toast.LENGTH_LONG).show();
- return;
- } else {
- Toast.makeText(getApplicationContext(),
- "Account Successfully Created ", Toast.LENGTH_LONG).show();
- Intent i = new Intent(RegisterActivity.this,
- LoginActivity.class);
- startActivity(i);
- finish();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement