From 01b8ed9c37032b0ee418901cd1369f63fdab8878 Mon Sep 17 00:00:00 2001 From: Nikolay Pultsin Date: Thu, 24 Sep 2015 21:10:06 +0100 Subject: [PATCH] better pref enabling/disabling --- assets/resources/application/en.xml | 2 +- .../fbreader/preferences/PreferenceActivity.java | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/assets/resources/application/en.xml b/assets/resources/application/en.xml index f69adf9b0..bbff77c43 100644 --- a/assets/resources/application/en.xml +++ b/assets/resources/application/en.xml @@ -710,7 +710,7 @@ - + diff --git a/src/org/geometerplus/android/fbreader/preferences/PreferenceActivity.java b/src/org/geometerplus/android/fbreader/preferences/PreferenceActivity.java index 19268707f..df1e42bce 100644 --- a/src/org/geometerplus/android/fbreader/preferences/PreferenceActivity.java +++ b/src/org/geometerplus/android/fbreader/preferences/PreferenceActivity.java @@ -556,20 +556,7 @@ public class PreferenceActivity extends ZLPreferenceActivity { newStyleFooterPreferences.add(statusLineScreen.addOption(profile.FooterNGForegroundOption, "footerForegroundColor")); newStyleFooterPreferences.add(statusLineScreen.addOption(profile.FooterNGForegroundUnreadOption, "footerForegroundUnreadColor")); footerPreferences.add(statusLineScreen.addOption(footerOptions.ShowTOCMarks, "tocMarks")); - - statusLineScreen.addPreference(new ZLEnumPreference( - this, - footerOptions.ShowProgress, - statusLineScreen.Resource.getResource("showProgressTypes") - ) { - @Override - public boolean isEnabled() { - int scrollbarType = viewOptions.ScrollbarType.getValue(); - return scrollbarType == FBView.SCROLLBAR_SHOW_AS_FOOTER || - scrollbarType == FBView.SCROLLBAR_SHOW_AS_FOOTER_OLD_STYLE; - } - }); - + footerPreferences.add(statusLineScreen.addOption(footerOptions.ShowProgress, "showProgress")); footerPreferences.add(statusLineScreen.addOption(footerOptions.ShowClock, "showClock")); footerPreferences.add(statusLineScreen.addOption(footerOptions.ShowBattery, "showBattery")); footerPreferences.add(statusLineScreen.addPreference(new FontPreference(