aboutsummaryrefslogtreecommitdiff
path: root/searchview
diff options
context:
space:
mode:
Diffstat (limited to 'searchview')
-rw-r--r--searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt10
1 files changed, 6 insertions, 4 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 10f2de3..18eb675 100644
--- a/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
+++ b/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
@@ -62,7 +62,7 @@ import ca.allanwang.kau.utils.tint
import ca.allanwang.kau.utils.toDrawable
import ca.allanwang.kau.utils.visible
import ca.allanwang.kau.utils.withLinearAdapter
-import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
+import com.mikepenz.fastadapter.adapters.FastItemAdapter
import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.google_material_typeface_library.GoogleMaterial
import kotlinx.android.synthetic.main.kau_search_view.view.*
@@ -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 =