diff --git a/app/ui/base/src/main/res/values/styles.xml b/app/ui/base/src/main/res/values/styles.xml index 9b3825838f1ddec26174823bad10b25185c21163..3136371b50642b74fc129b317d13e821b04b42fa 100644 --- a/app/ui/base/src/main/res/values/styles.xml +++ b/app/ui/base/src/main/res/values/styles.xml @@ -11,6 +11,7 @@ @color/color_default_ternary_text @color/color_default_primary_dark @color/color_default_primary_dark + @style/CustomSearchView + + \ No newline at end of file diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt index e181cbe78900b4453f90255b09795b810ad40dd1..47a5dc234dce2ac8342920ac98cf3dc6f4d6bda0 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt @@ -1059,6 +1059,10 @@ open class MessageList : searchView = searchItem.actionView as SearchView searchView.maxWidth = Int.MAX_VALUE searchView.queryHint = resources.getString(R.string.search_action) + val searchEditText = searchView.findViewById(androidx.appcompat.R.id.search_src_text) as SearchView.SearchAutoComplete + val searchIcon = ContextCompat.getDrawable(this, R.drawable.ic_magnify) + searchEditText.setCompoundDrawablesWithIntrinsicBounds(searchIcon, null, null, null) + searchEditText.compoundDrawablePadding = resources.getDimensionPixelSize(R.dimen.search_icon_searchView_padding) val searchManager = getSystemService(Context.SEARCH_SERVICE) as SearchManager searchView.setSearchableInfo(searchManager.getSearchableInfo(componentName)) searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener { diff --git a/app/ui/legacy/src/main/res/values/dimensions.xml b/app/ui/legacy/src/main/res/values/dimensions.xml index 0a478eab7afc521097a449b3ef0f7297b2bcb6ce..b0aea872c4fd34aefb643b087ee497002dd3b79e 100644 --- a/app/ui/legacy/src/main/res/values/dimensions.xml +++ b/app/ui/legacy/src/main/res/values/dimensions.xml @@ -7,4 +7,6 @@ 8dp 4dp 12dp + + 14dp