From de649fdd31f2d673de8eca9684ff5c66fbd53ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 8 May 2014 12:08:47 +0200 Subject: Signup option in login dialog. --- app/src/main/java/se/leap/bitmaskclient/LogInDialog.java | 13 ++++++++----- app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java | 5 ----- app/src/main/res/menu/client_dashboard.xml | 1 - 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'app') 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"/>