From 9f7f4fd27a02c02b15df613710433dfc35ad8e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sat, 15 Feb 2014 18:04:30 +0100 Subject: Add None-entry to ListPreference --- .../src/org/openintents/openpgp/util/OpenPgpListPreference.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenPGP-Keychain-API/libraries/keychain-api-library/src') diff --git a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java b/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java index e29794e87..4917b6993 100644 --- a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java +++ b/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java @@ -33,6 +33,8 @@ import android.widget.TextView; import java.util.ArrayList; import java.util.List; +import org.sufficientlysecure.keychain.api.R; + public class OpenPgpListPreference extends DialogPreference { ArrayList mProviderList = new ArrayList(); private String mSelectedPackage; @@ -55,6 +57,10 @@ public class OpenPgpListPreference extends DialogPreference { mProviderList.add(new OpenPgpProviderEntry(packageName, simpleName, icon)); } } + + // add "none" + mProviderList.add(0, new OpenPgpProviderEntry("", context.getString(R.string.openpgp_list_preference_none), + context.getResources().getDrawable(R.drawable.ic_action_cancel_launchersize))); } public OpenPgpListPreference(Context context) { -- cgit v1.2.3