From c09b59f09a24d79ff306aea7dd86e6ca2b2c3208 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 26 Jun 2017 14:37:18 -0700 Subject: Improve search item layout --- sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sample/src/main/kotlin/ca') 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(text.length, { text }).map { SearchItem(it) } + searchView.results = if (text.length == 3) emptyList() else Array(text.length, { text }).map { SearchItem(it, description = it) } } } noResultsFound = R.string.kau_no_results_found -- cgit v1.2.3