diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/SettingsActivity.kt index 279622b..b42fe3b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/SettingsActivity.kt @@ -107,11 +107,11 @@ class SettingsActivity : SimpleActivity() { } private fun setupDrawerSearchBar() { - val useSearchBar = config.useSearchBar - settings_show_search.isChecked = useSearchBar + val showSearchBar = config.showSearchBar + settings_show_search_bar.isChecked = showSearchBar settings_drawer_search_holder.setOnClickListener { - settings_show_search.toggle() - config.useSearchBar = settings_show_search.isChecked + settings_show_search_bar.toggle() + config.showSearchBar = settings_show_search_bar.isChecked } } diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt index 816c940..fe4a5d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt @@ -175,7 +175,7 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment background = ColorDrawable(context.getProperBackgroundColor()) (all_apps_grid.adapter as? LaunchersAdapter)?.updateTextColor(context.getProperTextColor()) - search_bar.beVisibleIf(context.config.useSearchBar) + search_bar.beVisibleIf(context.config.showSearchBar) search_bar.getToolbar()?.beGone() search_bar.updateColors() search_bar.setupMenu() diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Config.kt index 0e22818..637394a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Config.kt @@ -17,7 +17,7 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getInt(DRAWER_COLUMN_COUNT, context.resources.getInteger(R.integer.portrait_column_count)) set(drawerColumnCount) = prefs.edit().putInt(DRAWER_COLUMN_COUNT, drawerColumnCount).apply() - var useSearchBar: Boolean - get() = prefs.getBoolean(USE_SEARCH_BAR, true) - set(searchBarEnabled) = prefs.edit().putBoolean(USE_SEARCH_BAR, searchBarEnabled).apply() + var showSearchBar: Boolean + get() = prefs.getBoolean(SHOW_SEARCH_BAR, true) + set(showSearchBar) = prefs.edit().putBoolean(SHOW_SEARCH_BAR, showSearchBar).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Constants.kt index 4bedce9..f543854 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/helpers/Constants.kt @@ -6,7 +6,7 @@ const val WIDGET_LIST_ITEMS_HOLDER = 1 // shared prefs const val WAS_HOME_SCREEN_INIT = "was_home_screen_init" const val DRAWER_COLUMN_COUNT = "drawer_column_count" -const val USE_SEARCH_BAR = "use_search_bar" +const val SHOW_SEARCH_BAR = "show_search_bar" // default home screen grid size const val ROW_COUNT = 6 diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 2265e61..08d9a08 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -179,7 +179,7 @@ android:background="@drawable/ripple_bottom_corners">