From e3acc71aaedfcf97b2adee907b6587e3c1eadf48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 7 Feb 2013 21:25:58 +0100 Subject: Button not working from ConfigurationWizard. Trying to test cancel button from created new dialog. --- src/se/leap/leapclient/ConfigurationWizard.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/se/leap/leapclient/ConfigurationWizard.java') diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index f759b37..86de817 100644 --- a/src/se/leap/leapclient/ConfigurationWizard.java +++ b/src/se/leap/leapclient/ConfigurationWizard.java @@ -10,11 +10,15 @@ import org.json.JSONObject; import se.leap.leapclient.ProviderListContent.ProviderItem; import android.app.Activity; +import android.app.DialogFragment; +import android.app.Fragment; import android.app.FragmentManager; +import android.app.FragmentTransaction; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetManager; import android.os.Bundle; +import android.view.View; /** @@ -41,6 +45,8 @@ public class ConfigurationWizard extends Activity * device. */ private boolean mTwoPane; + + private int mStackLevel; static SharedPreferences shared_preferences; @@ -152,4 +158,16 @@ public class ConfigurationWizard extends Activity startService(provider_API_command); } + + public void addNewProvider(View view) { + FragmentTransaction fragment_transaction = getFragmentManager().beginTransaction(); + Fragment previous_new_provider_dialog = getFragmentManager().findFragmentByTag("newProviderDialog"); + if (previous_new_provider_dialog != null) { + fragment_transaction.remove(previous_new_provider_dialog); + } + fragment_transaction.addToBackStack(null); + + DialogFragment newFragment = NewProviderDialog.newInstance(); + newFragment.show(fragment_transaction, "newProviderDialog"); + } } -- cgit v1.2.3