Browse Source

Make search views take up full width

arkon 4 years ago
parent
commit
8efe0502f3

+ 1 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt

@@ -193,6 +193,7 @@ class SourceController :
         // Initialize search option.
         val searchItem = menu.findItem(R.id.action_search)
         val searchView = searchItem.actionView as SearchView
+        searchView.maxWidth = Int.MAX_VALUE
 
         // Change hint to show global search.
         searchView.queryHint = applicationContext?.getString(R.string.action_global_search_hint)

+ 1 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt

@@ -233,6 +233,7 @@ open class BrowseSourceController(bundle: Bundle) :
         // Initialize search menu
         val searchItem = menu.findItem(R.id.action_search)
         val searchView = searchItem.actionView as SearchView
+        searchView.maxWidth = Int.MAX_VALUE
 
         val query = presenter.query
         if (!query.isBlank()) {

+ 1 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt

@@ -100,6 +100,7 @@ open class GlobalSearchController(
         // Initialize search menu
         val searchItem = menu.findItem(R.id.action_search)
         val searchView = searchItem.actionView as SearchView
+        searchView.maxWidth = Int.MAX_VALUE
 
         searchItem.setOnActionExpandListener(object : MenuItem.OnActionExpandListener {
             override fun onMenuItemActionExpand(item: MenuItem?): Boolean {

+ 1 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt

@@ -326,6 +326,7 @@ class LibraryController(
 
         val searchItem = menu.findItem(R.id.action_search)
         val searchView = searchItem.actionView as SearchView
+        searchView.maxWidth = Int.MAX_VALUE
 
         searchView.queryTextChanges()
             // Ignore events if this controller isn't at the top