mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 19:09:17 +01:00
Make search views take up full width
This commit is contained in:
parent
0eb61f34f6
commit
8efe0502f3
@ -193,6 +193,7 @@ class SourceController :
|
|||||||
// Initialize search option.
|
// Initialize search option.
|
||||||
val searchItem = menu.findItem(R.id.action_search)
|
val searchItem = menu.findItem(R.id.action_search)
|
||||||
val searchView = searchItem.actionView as SearchView
|
val searchView = searchItem.actionView as SearchView
|
||||||
|
searchView.maxWidth = Int.MAX_VALUE
|
||||||
|
|
||||||
// Change hint to show global search.
|
// Change hint to show global search.
|
||||||
searchView.queryHint = applicationContext?.getString(R.string.action_global_search_hint)
|
searchView.queryHint = applicationContext?.getString(R.string.action_global_search_hint)
|
||||||
|
@ -233,6 +233,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
// Initialize search menu
|
// Initialize search menu
|
||||||
val searchItem = menu.findItem(R.id.action_search)
|
val searchItem = menu.findItem(R.id.action_search)
|
||||||
val searchView = searchItem.actionView as SearchView
|
val searchView = searchItem.actionView as SearchView
|
||||||
|
searchView.maxWidth = Int.MAX_VALUE
|
||||||
|
|
||||||
val query = presenter.query
|
val query = presenter.query
|
||||||
if (!query.isBlank()) {
|
if (!query.isBlank()) {
|
||||||
|
@ -100,6 +100,7 @@ open class GlobalSearchController(
|
|||||||
// Initialize search menu
|
// Initialize search menu
|
||||||
val searchItem = menu.findItem(R.id.action_search)
|
val searchItem = menu.findItem(R.id.action_search)
|
||||||
val searchView = searchItem.actionView as SearchView
|
val searchView = searchItem.actionView as SearchView
|
||||||
|
searchView.maxWidth = Int.MAX_VALUE
|
||||||
|
|
||||||
searchItem.setOnActionExpandListener(object : MenuItem.OnActionExpandListener {
|
searchItem.setOnActionExpandListener(object : MenuItem.OnActionExpandListener {
|
||||||
override fun onMenuItemActionExpand(item: MenuItem?): Boolean {
|
override fun onMenuItemActionExpand(item: MenuItem?): Boolean {
|
||||||
|
@ -326,6 +326,7 @@ class LibraryController(
|
|||||||
|
|
||||||
val searchItem = menu.findItem(R.id.action_search)
|
val searchItem = menu.findItem(R.id.action_search)
|
||||||
val searchView = searchItem.actionView as SearchView
|
val searchView = searchItem.actionView as SearchView
|
||||||
|
searchView.maxWidth = Int.MAX_VALUE
|
||||||
|
|
||||||
searchView.queryTextChanges()
|
searchView.queryTextChanges()
|
||||||
// Ignore events if this controller isn't at the top
|
// Ignore events if this controller isn't at the top
|
||||||
|
Loading…
Reference in New Issue
Block a user