diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-26 16:36:38 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-26 16:36:38 -0700 |
commit | cc6d3f96af3bdcb65f34b53ce7749b1d73077068 (patch) | |
tree | b504d2d1c909a2a28913684bf0cc5d2318a104c4 /library/src | |
parent | f1ad240716d9cb99dd3077a4dc189d67e7803f9f (diff) | |
download | kau-cc6d3f96af3bdcb65f34b53ce7749b1d73077068.tar.gz kau-cc6d3f96af3bdcb65f34b53ce7749b1d73077068.tar.bz2 kau-cc6d3f96af3bdcb65f34b53ce7749b1d73077068.zip |
Add back press listener
Diffstat (limited to 'library/src')
-rw-r--r-- | library/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt | 6 |
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) { |