diff options
author | Andrea Torlaschi <runnerway@gmail.com> | 2016-05-17 16:51:44 +0200 |
---|---|---|
committer | Andrea Torlaschi <runnerway@gmail.com> | 2016-05-17 16:51:44 +0200 |
commit | a2d2da90984a6cc4191d55d349372f1ac5d6259a (patch) | |
tree | 9220a03bfab5da6d764791f49966e5107e047a21 /OpenKeychain/src/main | |
parent | 320909f3ce6e10b18e7ffdb457825204c8a359d8 (diff) | |
download | open-keychain-a2d2da90984a6cc4191d55d349372f1ac5d6259a.tar.gz open-keychain-a2d2da90984a6cc4191d55d349372f1ac5d6259a.tar.bz2 open-keychain-a2d2da90984a6cc4191d55d349372f1ac5d6259a.zip |
Settings: change CheckBoxPreference to SwitchPreference
Diffstat (limited to 'OpenKeychain/src/main')
3 files changed, 5 insertions, 12 deletions
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) { diff --git a/OpenKeychain/src/main/res/xml/cloud_search_preferences.xml b/OpenKeychain/src/main/res/xml/cloud_search_preferences.xml index 85d6a6bca..e1ab50d63 100644 --- a/OpenKeychain/src/main/res/xml/cloud_search_preferences.xml +++ b/OpenKeychain/src/main/res/xml/cloud_search_preferences.xml @@ -5,17 +5,13 @@ android:key="search_keyserver_pref" android:summary="@string/pref_keyserver_summary" android:title="@string/pref_keyserver" /> - <PreferenceScreen android:dependency="search_keyserver_pref" android:key="keyServers" - android:persistent="false" android:title="@string/label_keyservers" /> - <SwitchPreference android:defaultValue="true" android:key="search_keybase_pref" android:summary="@string/pref_keybase_summary" android:title="@string/pref_keybase" /> - </PreferenceScreen>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/xml/passphrase_preferences.xml b/OpenKeychain/src/main/res/xml/passphrase_preferences.xml index 40500e53c..fa801ed8b 100644 --- a/OpenKeychain/src/main/res/xml/passphrase_preferences.xml +++ b/OpenKeychain/src/main/res/xml/passphrase_preferences.xml @@ -1,15 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen android:key="passphraseCacheTtls" - android:persistent="false" android:title="@string/label_passphrase_cache_ttl" /> - <CheckBoxPreference + <SwitchPreference android:key="passphraseCacheSubs" - android:persistent="true" android:title="@string/label_passphrase_cache_subs" /> - <CheckBoxPreference + <SwitchPreference android:defaultValue="true" android:key="useNumKeypadForYubikeyPin" - android:persistent="true" android:title="@string/label_use_num_keypad_for_security_token_pin" /> </PreferenceScreen> |