From 2f7f7ad90853ca46b4fbcf432e478b2b25598298 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 6 Jun 2012 15:03:46 +0200 Subject: [PATCH] Made sure every PreferenceScreen has an associated key If a PreferenceScreen has no associated key the screen can't be restored after an orientation change (and the main screen is displayed) --- res/xml/account_settings_preferences.xml | 11 ++++++++--- res/xml/folder_settings_preferences.xml | 3 +++ res/xml/font_preferences.xml | 3 +++ res/xml/global_preferences.xml | 25 +++++++++++++----------- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/res/xml/account_settings_preferences.xml b/res/xml/account_settings_preferences.xml index 683827258..81b41c10e 100644 --- a/res/xml/account_settings_preferences.xml +++ b/res/xml/account_settings_preferences.xml @@ -18,6 +18,9 @@ Make sure to add android:persistent="false" to all preferences to disable saving the preference values to SharedPreferences. We use our own storage mechanism for the preferences. See com.fsck.k9.preferences.Storage. + + Also note that every sub-PreferenceScreen needs an "android:key" parameter so the correct screen + can be displayed after the device has been rotated. --> @@ -43,7 +46,8 @@ + android:title="@string/account_settings_display_prefs_title" + android:key="display"> + android:title="@string/interaction_preferences" + android:key="interaction"> + android:key="storage_provider"> diff --git a/res/xml/font_preferences.xml b/res/xml/font_preferences.xml index 52606d089..ce9edf607 100644 --- a/res/xml/font_preferences.xml +++ b/res/xml/font_preferences.xml @@ -4,6 +4,9 @@ Make sure to add android:persistent="false" to all preferences to disable saving the preference values to SharedPreferences. We use our own storage mechanism for the preferences. See com.fsck.k9.preferences.Storage. + + Also note that every sub-PreferenceScreen needs an "android:key" parameter so the correct screen + can be displayed after the device has been rotated. --> diff --git a/res/xml/global_preferences.xml b/res/xml/global_preferences.xml index 02fa3c9a7..2c7556f31 100644 --- a/res/xml/global_preferences.xml +++ b/res/xml/global_preferences.xml @@ -18,6 +18,9 @@ Make sure to add android:persistent="false" to all preferences to disable saving the preference values to SharedPreferences. We use our own storage mechanism for the preferences. See com.fsck.k9.preferences.Storage. + + Also note that every sub-PreferenceScreen needs an "android:key" parameter so the correct screen + can be displayed after the device has been rotated. --> @@ -66,13 +69,13 @@ android:key="animations" android:title="@string/animations_title" android:summary="@string/animations_summary" /> - + - + @@ -157,7 +160,7 @@ android:dependency="messagelist_show_contact_name" /> - + - + + /> + /> - - -