aboutsummaryrefslogtreecommitdiff
path: root/searchview
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-13 00:51:31 -0700
committerAllan Wang <me@allanwang.ca>2019-06-13 00:51:31 -0700
commit423cad016753a795e9cb75534d172f562e4326c1 (patch)
treeecd4ffcaec76683534b06845fe7b10eb973ee2de /searchview
parent6163bd66050ef22921b21a9a528bd090986795d6 (diff)
downloadkau-423cad016753a795e9cb75534d172f562e4326c1.tar.gz
kau-423cad016753a795e9cb75534d172f562e4326c1.tar.bz2
kau-423cad016753a795e9cb75534d172f562e4326c1.zip
Update iconics to 4.x.x
Diffstat (limited to 'searchview')
-rw-r--r--searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt b/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
index e4c6dbd..709dbad 100644
--- a/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
+++ b/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
@@ -390,7 +390,9 @@ class SearchView @JvmOverloads constructor(
config(config)
val menuItem = menu.findItem(id)
?: throw IllegalArgumentException("Menu item with given id doesn't exist")
- if (menuItem.icon == null) menuItem.icon = GoogleMaterial.Icon.gmd_search.toDrawable(context, 18, menuIconColor)
+ if (menuItem.icon == null) {
+ menuItem.icon = GoogleMaterial.Icon.gmd_search.toDrawable(context, 18, menuIconColor)
+ }
kau_search_cardview.gone()
menuItem.setOnMenuItemClickListener { revealOpen(); true }
kau_search_shadow.setOnClickListener { revealClose() }
@@ -509,7 +511,7 @@ fun Activity.bindSearchView(
menu: Menu,
@IdRes id: Int,
@ColorInt menuIconColor: Int = Color.WHITE,
- config: SearchView.Configs.() -> Unit = {}
+ config: Configs.() -> Unit = {}
): SearchView = findViewById<ViewGroup>(android.R.id.content).bindSearchView(menu, id, menuIconColor, config)
/**
@@ -522,7 +524,7 @@ fun ViewGroup.bindSearchView(
menu: Menu,
@IdRes id: Int,
@ColorInt menuIconColor: Int = Color.WHITE,
- config: SearchView.Configs.() -> Unit = {}
+ config: Configs.() -> Unit = {}
): SearchView {
val searchView = SearchView(context)
searchView.layoutParams =