made it pretty
This commit is contained in:
parent
f0b25cb4da
commit
f5bc54316a
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ public class SignUp extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_sign_up);
|
||||
MaterialSpinner spinner = findViewById(R.id.RoleInput);
|
||||
spinner.setItems("HomeOwner", "Service Provider");
|
||||
spinner.setItems("Home Owner", "Service Provider");
|
||||
spinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
|
||||
|
||||
@Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
|
||||
|
@ -36,7 +36,7 @@ public class SignUp extends AppCompatActivity {
|
|||
if(username.length()>=5 && password.length()>5 && firstname.length()>0 && lastname.length()>0 && username.matches("[a-zA-Z0-9]*") && password.matches("[a-zA-Z0-9]*")
|
||||
&& firstname.matches("[a-zA-Z]*") && lastname.matches("[a-zA-Z]*")){
|
||||
switch(spinner.getText().toString()){
|
||||
case "HomeOwner":
|
||||
case "Home Owner":
|
||||
newUser = new HomeOwner(username,password,firstname,lastname);
|
||||
break;
|
||||
case "Service Provider":
|
||||
|
|
Loading…
Reference in a new issue