summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/NewProviderDialog.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-02-07 21:25:58 +0100
committerParménides GV <parmegv@sdf.org>2013-02-07 21:25:58 +0100
commite3acc71aaedfcf97b2adee907b6587e3c1eadf48 (patch)
tree5beb3e7a546fcf17bef3a6e75efed20c5dcfab1d /src/se/leap/leapclient/NewProviderDialog.java
parentbaaf0fec8894513768f0ba3406a9dfe2d7ad2775 (diff)
Button not working from ConfigurationWizard.
Trying to test cancel button from created new dialog.
Diffstat (limited to 'src/se/leap/leapclient/NewProviderDialog.java')
-rw-r--r--src/se/leap/leapclient/NewProviderDialog.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/se/leap/leapclient/NewProviderDialog.java b/src/se/leap/leapclient/NewProviderDialog.java
new file mode 100644
index 00000000..fd6d4619
--- /dev/null
+++ b/src/se/leap/leapclient/NewProviderDialog.java
@@ -0,0 +1,32 @@
+package se.leap.leapclient;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+
+public class NewProviderDialog extends DialogFragment {
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ builder.setMessage(R.string.introduce_new_provider)
+ .setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ // Save provider
+ }
+ })
+ .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ });
+ // Create the AlertDialog object and return it
+ return builder.create();
+ }
+
+ public static DialogFragment newInstance() {
+ NewProviderDialog dialog_fragment = new NewProviderDialog();
+ return dialog_fragment;
+ }
+
+}