From daf454c9582280d1c672103ceaac19c3e36b482d Mon Sep 17 00:00:00 2001 From: Corewala Date: Tue, 14 Dec 2021 18:22:14 -0500 Subject: [PATCH] Made all summary blocks non-selectable --- .../corewala/buran/ui/settings/SettingsFragment.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/corewala/buran/ui/settings/SettingsFragment.kt b/app/src/main/java/corewala/buran/ui/settings/SettingsFragment.kt index f2b5e8a..95ea74c 100644 --- a/app/src/main/java/corewala/buran/ui/settings/SettingsFragment.kt +++ b/app/src/main/java/corewala/buran/ui/settings/SettingsFragment.kt @@ -86,9 +86,11 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang webCategory.title = getString(R.string.web_content) screen.addPreference(webCategory) - val customTabInfo = Preference(context) - customTabInfo.summary = getString(R.string.web_content_label) - webCategory.addPreference(customTabInfo) + val aboutCustomTabPref = Preference(context) + aboutCustomTabPref.summary = getString(R.string.web_content_label) + aboutCustomTabPref.isPersistent = false + aboutCustomTabPref.isSelectable = false + webCategory.addPreference(aboutCustomTabPref) val useCustomTabsPreference = SwitchPreferenceCompat(context) useCustomTabsPreference.setDefaultValue(true) @@ -174,6 +176,8 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang //Accessibility - code blocks val aboutCodeBlocksPref = Preference(context) aboutCodeBlocksPref.summary = getString(R.string.collapse_code_blocks_about) + aboutCodeBlocksPref.isPersistent = false + aboutCodeBlocksPref.isSelectable = false accessibilityCategory.addPreference(aboutCodeBlocksPref) val collapseCodeBlocksPreference = SwitchPreferenceCompat(context)