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