aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt b/library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
index 423fbcd..c85450b 100644
--- a/library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
+++ b/library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
@@ -180,10 +180,8 @@ class SearchView @JvmOverloads constructor(
init {
View.inflate(context, R.layout.kau_search_view, this)
z = 99f
- iconNav.setSearchIcon(configs.navIcon)
- iconClear.setSearchIcon(configs.clearIcon).setOnClickListener {
- editText.text.clear()
- }
+ iconNav.setSearchIcon(configs.navIcon).setOnClickListener { clearResults() }
+ iconClear.setSearchIcon(configs.clearIcon).setOnClickListener { editText.text.clear() }
tintForeground(configs.foregroundColor)
tintBackground(configs.backgroundColor)
with(recycler) {