From 423cad016753a795e9cb75534d172f562e4326c1 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 00:51:31 -0700 Subject: Update iconics to 4.x.x --- .../src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'searchview') 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(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 = -- cgit v1.2.3