summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/LogInDialog.java13
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java5
-rw-r--r--app/src/main/res/menu/client_dashboard.xml1
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