diff options
author | Parménides GV <parmegv@sdf.org> | 2013-11-11 18:57:02 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-12-10 18:18:16 +0100 |
commit | 6f8a6b145f2e699258963a8a1b8f555fc96f4ead (patch) | |
tree | 42f6aa99de5b36c49c94fb830a26fd5d5340384a /src/se/leap/bitmaskclient/NewProviderDialog.java | |
parent | 9ff9dc75f267bd6e339c026c4f3e73478210b0b6 (diff) |
Retry button prompts new provider dialog.
The user can change the new provider's data entered before failing.
Diffstat (limited to 'src/se/leap/bitmaskclient/NewProviderDialog.java')
-rw-r--r-- | src/se/leap/bitmaskclient/NewProviderDialog.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/se/leap/bitmaskclient/NewProviderDialog.java b/src/se/leap/bitmaskclient/NewProviderDialog.java index 98686bd2..5a20a355 100644 --- a/src/se/leap/bitmaskclient/NewProviderDialog.java +++ b/src/se/leap/bitmaskclient/NewProviderDialog.java @@ -16,7 +16,8 @@ */ package se.leap.bitmaskclient; -import se.leap.bitmaskclient.R; +import se.leap.leapclient.ProviderListContent.ProviderItem; +import se.leap.leapclient.R; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; @@ -71,7 +72,14 @@ public class NewProviderDialog extends DialogFragment { LayoutInflater inflater = getActivity().getLayoutInflater(); View new_provider_dialog_view = inflater.inflate(R.layout.new_provider_dialog, null); final EditText url_input_field = (EditText)new_provider_dialog_view.findViewById(R.id.new_provider_url); + if(getArguments() != null && getArguments().containsKey(Provider.MAIN_URL)) { + url_input_field.setText(getArguments().getString(Provider.MAIN_URL)); + } final CheckBox danger_checkbox = (CheckBox)new_provider_dialog_view.findViewById(R.id.danger_checkbox); + if(getArguments() != null && getArguments().containsKey(ProviderItem.DANGER_ON)) { + danger_checkbox.setActivated(getArguments().getBoolean(ProviderItem.DANGER_ON)); + } + builder.setView(new_provider_dialog_view) .setMessage(R.string.introduce_new_provider) .setPositiveButton(R.string.save, new DialogInterface.OnClickListener() { |