diff options
Diffstat (limited to 'searchview/src/main/kotlin/ca')
-rw-r--r-- | searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt b/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt index a98b2f6..cc56289 100644 --- a/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt +++ b/searchview/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt @@ -229,14 +229,13 @@ class SearchView @JvmOverloads constructor( tintBackground(configs.backgroundColor) with(recycler) { isNestedScrollingEnabled = false - layoutManager = LinearLayoutManager(context) + withLinearAdapter(this@SearchView.adapter) addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { super.onScrollStateChanged(recyclerView, newState) if (newState == RecyclerView.SCROLL_STATE_DRAGGING) hideKeyboard() } }) - adapter = this@SearchView.adapter itemAnimator = null } with(adapter) { |