From 8efe0502f3394cef446dd8839bd66dcd21bbe083 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 29 Apr 2020 09:02:09 -0400 Subject: [PATCH] Make search views take up full width --- .../eu/kanade/tachiyomi/ui/browse/source/SourceController.kt | 1 + .../tachiyomi/ui/browse/source/browse/BrowseSourceController.kt | 1 + .../ui/browse/source/globalsearch/GlobalSearchController.kt | 1 + .../java/eu/kanade/tachiyomi/ui/library/LibraryController.kt | 1 + 4 files changed, 4 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt index c9603514d..e4cb9f398 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt +++ b/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) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index 09fd05e2f..5a449120d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/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()) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt index 8e4b27d31..be1da5ecd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt +++ b/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 { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index f68e15b79..2507bfc74 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/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