aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main/kotlin/ca/allanwang
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-26 14:37:18 -0700
committerAllan Wang <me@allanwang.ca>2017-06-26 14:37:18 -0700
commitc09b59f09a24d79ff306aea7dd86e6ca2b2c3208 (patch)
tree60a872c925abd99fe4f9494a9b51c3170fe6010d /sample/src/main/kotlin/ca/allanwang
parentc9302a7b0f3c66b3514f1f5b83c86757db33008a (diff)
downloadkau-c09b59f09a24d79ff306aea7dd86e6ca2b2c3208.tar.gz
kau-c09b59f09a24d79ff306aea7dd86e6ca2b2c3208.tar.bz2
kau-c09b59f09a24d79ff306aea7dd86e6ca2b2c3208.zip
Improve search item layout
Diffstat (limited to 'sample/src/main/kotlin/ca/allanwang')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt7
1 files changed, 5 insertions, 2 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 cc74ed7..51010c0 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -10,7 +10,10 @@ import ca.allanwang.kau.kpref.KPrefAdapterBuilder
import ca.allanwang.kau.logging.KL
import ca.allanwang.kau.searchview.SearchItem
import ca.allanwang.kau.searchview.bindSearchView
-import ca.allanwang.kau.utils.*
+import ca.allanwang.kau.utils.materialDialog
+import ca.allanwang.kau.utils.navigationBarColor
+import ca.allanwang.kau.utils.startActivity
+import ca.allanwang.kau.utils.toast
import ca.allanwang.kau.views.RippleCanvas
import com.mikepenz.google_material_typeface_library.GoogleMaterial
@@ -128,7 +131,7 @@ class MainActivity : KPrefActivity() {
observable.subscribe {
text ->
KL.e(text)
- searchView.results = if (text.length == 3) emptyList() else Array<String>(text.length, { text }).map { SearchItem(it) }
+ searchView.results = if (text.length == 3) emptyList() else Array<String>(text.length, { text }).map { SearchItem(it, description = it) }
}
}
noResultsFound = R.string.kau_no_results_found