diff options
author | Parménides GV <parmegv@sdf.org> | 2014-05-08 12:08:47 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-05-08 12:08:47 +0200 |
commit | de649fdd31f2d673de8eca9684ff5c66fbd53ef3 (patch) | |
tree | afd1d263489d952a2ac0bf9e2690779010ca558e | |
parent | 00c185a7b6bfc727ff53b9a87620766e5adbb7b7 (diff) |
Signup option in login dialog.
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/LogInDialog.java | 13 | ||||
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java | 5 | ||||
-rw-r--r-- | app/src/main/res/menu/client_dashboard.xml | 1 |
3 files changed, 8 insertions, 11 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java b/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java index da74958d..45d3a373 100644 --- a/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java @@ -101,6 +101,13 @@ public class LogInDialog extends DialogFragment { dialog.cancel(); interface_with_Dashboard.cancelLoginOrSignup(); } + }) + .setNeutralButton(R.string.signup_button, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + String username = username_field.getText().toString(); + String password = password_field.getText().toString(); + interface_with_Dashboard.signUp(username, password); + } }); return builder.create(); @@ -113,13 +120,9 @@ public class LogInDialog extends DialogFragment { * */ public interface LogInDialogInterface { - /** - * Starts authentication process. - * @param username - * @param password - */ public void authenticate(String username, String password); public void cancelAuthedEipOn(); + public void signUp(String username, String password); public void cancelLoginOrSignup(); } diff --git a/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java b/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java index 2ba65c5d..120d4eec 100644 --- a/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java @@ -112,11 +112,6 @@ public class SignUpDialog extends DialogFragment { * */ public interface SignUpDialogInterface { - /** - * Starts authentication process. - * @param username - * @param password - */ public void signUp(String username, String password); public void cancelAuthedEipOn(); public void cancelLoginOrSignup(); diff --git a/app/src/main/res/menu/client_dashboard.xml b/app/src/main/res/menu/client_dashboard.xml index d4e9c879..663231cd 100644 --- a/app/src/main/res/menu/client_dashboard.xml +++ b/app/src/main/res/menu/client_dashboard.xml @@ -9,7 +9,6 @@ android:title="@string/switch_provider_menu_option"/> <item android:id="@+id/signup_button" - android:showAsAction="ifRoom" android:title="@string/signup_button" android:visible="false"/> <item |