diff --git a/src/com/fsck/k9/activity/setup/Prefs.java b/src/com/fsck/k9/activity/setup/Prefs.java index 128f22c2a..ce018b0da 100644 --- a/src/com/fsck/k9/activity/setup/Prefs.java +++ b/src/com/fsck/k9/activity/setup/Prefs.java @@ -17,7 +17,6 @@ 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; @@ -96,7 +95,6 @@ public class Prefs extends K9PreferenceActivity { private static final int ACTIVITY_CHOOSE_FOLDER = 1; - private static final String PREFERENCE_CATEGORY_MESSAGEVIEW_PREFERENCES = "messageview_preferences"; private ListPreference mLanguage; private ListPreference mTheme; @@ -286,10 +284,11 @@ public class Prefs extends K9PreferenceActivity { mShowNext.setChecked(K9.messageViewShowNext()); mMobileOptimizedLayout = (CheckBoxPreference) findPreference(PREFERENCE_MESSAGEVIEW_MOBILE_LAYOUT); - mMobileOptimizedLayout.setChecked(K9.mobileOptimizedLayout()); if (!MessageWebView.isSingleColumnLayoutSupported()) { - PreferenceCategory category = (PreferenceCategory) findPreference(PREFERENCE_CATEGORY_MESSAGEVIEW_PREFERENCES); - category.removePreference(mMobileOptimizedLayout); + mMobileOptimizedLayout.setEnabled(false); + mMobileOptimizedLayout.setChecked(false); + } else { + mMobileOptimizedLayout.setChecked(K9.mobileOptimizedLayout()); } mAutofitWidth = (CheckBoxPreference) findPreference(PREFERENCE_AUTOFIT_WIDTH);