From 5f49195a0a39f573e6728277ddf711fdcb26de87 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 19 Apr 2013 02:24:41 +0200 Subject: [PATCH] Hide "condensed layout" setting instead of disabling it --- src/com/fsck/k9/activity/setup/Prefs.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/activity/setup/Prefs.java b/src/com/fsck/k9/activity/setup/Prefs.java index c29aa8bfc..2772fce7f 100644 --- a/src/com/fsck/k9/activity/setup/Prefs.java +++ b/src/com/fsck/k9/activity/setup/Prefs.java @@ -17,6 +17,7 @@ import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; +import android.preference.PreferenceCategory; import android.preference.PreferenceScreen; import android.text.TextUtils; import android.widget.Toast; @@ -283,8 +284,8 @@ public class Prefs extends K9PreferenceActivity { mMobileOptimizedLayout = (CheckBoxPreference) findPreference(PREFERENCE_MESSAGEVIEW_MOBILE_LAYOUT); if (!MessageWebView.isSingleColumnLayoutSupported()) { - mMobileOptimizedLayout.setEnabled(false); - mMobileOptimizedLayout.setChecked(false); + PreferenceCategory prefs = (PreferenceCategory) findPreference("messageview_preferences"); + prefs.removePreference(mMobileOptimizedLayout); } else { mMobileOptimizedLayout.setChecked(K9.mobileOptimizedLayout()); }