From a2d2da90984a6cc4191d55d349372f1ac5d6259a Mon Sep 17 00:00:00 2001 From: Andrea Torlaschi Date: Tue, 17 May 2016 16:51:44 +0200 Subject: Settings: change CheckBoxPreference to SwitchPreference --- .../java/org/sufficientlysecure/keychain/ui/SettingsActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenKeychain/src/main/java') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java index 4fd327c8f..e71846577 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java @@ -30,7 +30,6 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; -import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.ListPreference; import android.preference.Preference; @@ -213,7 +212,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity { }); initializePassphraseCacheSubs( - (CheckBoxPreference) findPreference(Constants.Pref.PASSPHRASE_CACHE_SUBS)); + (SwitchPreference) findPreference(Constants.Pref.PASSPHRASE_CACHE_SUBS)); } } @@ -592,7 +591,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity { || super.isValidFragment(fragmentName); } - private static void initializePassphraseCacheSubs(final CheckBoxPreference mPassphraseCacheSubs) { + private static void initializePassphraseCacheSubs(final SwitchPreference mPassphraseCacheSubs) { mPassphraseCacheSubs.setChecked(sPreferences.getPassphraseCacheSubs()); mPassphraseCacheSubs.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { public boolean onPreferenceChange(Preference preference, Object newValue) { -- cgit v1.2.3