aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-17 19:53:53 -0700
committerAllan Wang <me@allanwang.ca>2017-08-30 12:24:19 -0400
commit9432652b03ae4d01e3dda4325984637d9523b9e2 (patch)
tree75c1c1103ace3515649fe6246ea18c54e1617e18 /sample/src/main/kotlin
parent5c45c832df044c400a76abad16a000a59d0bf54c (diff)
downloadkau-9432652b03ae4d01e3dda4325984637d9523b9e2.tar.gz
kau-9432652b03ae4d01e3dda4325984637d9523b9e2.tar.bz2
kau-9432652b03ae4d01e3dda4325984637d9523b9e2.zip
Add callback (#39)
Diffstat (limited to 'sample/src/main/kotlin')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
index 93fc651..5d0bd36 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -230,6 +230,11 @@ class MainActivity : KPrefActivity() {
val items = wordBank.filter { it.contains(query) }.sorted().map { SearchItem(it) }
searchView.results = items
}
+ searchCallback = {
+ query, _ ->
+ toast("Enter pressed for $query")
+ true
+ }
textDebounceInterval = 0
noResultsFound = R.string.kau_no_results_found
shouldClearOnClose = false