From cc6d3f96af3bdcb65f34b53ce7749b1d73077068 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 26 Jun 2017 16:36:38 -0700 Subject: Add back press listener --- library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt | 6 ++---- 1 file 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) { -- cgit v1.2.3