mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-02-19 21:10:36 +01:00
Rename showSearchBar setting for consistency
This commit is contained in:
parent
dffca7823c
commit
fe1e59297d
@ -107,11 +107,11 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupDrawerSearchBar() {
|
private fun setupDrawerSearchBar() {
|
||||||
val useSearchBar = config.useSearchBar
|
val showSearchBar = config.showSearchBar
|
||||||
settings_show_search.isChecked = useSearchBar
|
settings_show_search_bar.isChecked = showSearchBar
|
||||||
settings_drawer_search_holder.setOnClickListener {
|
settings_drawer_search_holder.setOnClickListener {
|
||||||
settings_show_search.toggle()
|
settings_show_search_bar.toggle()
|
||||||
config.useSearchBar = settings_show_search.isChecked
|
config.showSearchBar = settings_show_search_bar.isChecked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
|
|||||||
background = ColorDrawable(context.getProperBackgroundColor())
|
background = ColorDrawable(context.getProperBackgroundColor())
|
||||||
(all_apps_grid.adapter as? LaunchersAdapter)?.updateTextColor(context.getProperTextColor())
|
(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.getToolbar()?.beGone()
|
||||||
search_bar.updateColors()
|
search_bar.updateColors()
|
||||||
search_bar.setupMenu()
|
search_bar.setupMenu()
|
||||||
|
@ -17,7 +17,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
get() = prefs.getInt(DRAWER_COLUMN_COUNT, context.resources.getInteger(R.integer.portrait_column_count))
|
get() = prefs.getInt(DRAWER_COLUMN_COUNT, context.resources.getInteger(R.integer.portrait_column_count))
|
||||||
set(drawerColumnCount) = prefs.edit().putInt(DRAWER_COLUMN_COUNT, drawerColumnCount).apply()
|
set(drawerColumnCount) = prefs.edit().putInt(DRAWER_COLUMN_COUNT, drawerColumnCount).apply()
|
||||||
|
|
||||||
var useSearchBar: Boolean
|
var showSearchBar: Boolean
|
||||||
get() = prefs.getBoolean(USE_SEARCH_BAR, true)
|
get() = prefs.getBoolean(SHOW_SEARCH_BAR, true)
|
||||||
set(searchBarEnabled) = prefs.edit().putBoolean(USE_SEARCH_BAR, searchBarEnabled).apply()
|
set(showSearchBar) = prefs.edit().putBoolean(SHOW_SEARCH_BAR, showSearchBar).apply()
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ const val WIDGET_LIST_ITEMS_HOLDER = 1
|
|||||||
// shared prefs
|
// shared prefs
|
||||||
const val WAS_HOME_SCREEN_INIT = "was_home_screen_init"
|
const val WAS_HOME_SCREEN_INIT = "was_home_screen_init"
|
||||||
const val DRAWER_COLUMN_COUNT = "drawer_column_count"
|
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
|
// default home screen grid size
|
||||||
const val ROW_COUNT = 6
|
const val ROW_COUNT = 6
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
android:background="@drawable/ripple_bottom_corners">
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_show_search"
|
android:id="@+id/settings_show_search_bar"
|
||||||
style="@style/SettingsCheckboxStyle"
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user