To add androidx leanback bindings, import corbind-leanback
module:
dependencies {
implementation("ru.ldralighieri.corbind:corbind-leanback:1.11.0")
}
List of extensions
Component | Extension | Description |
---|---|---|
SearchBar | searchQueryChanges |
Called when the search bar detects a change in the query. |
searchQueryChangeEvents |
A more advanced version of the searchQueryChanges . |
|
SearchEditText | keyboardDismisses |
Called when the keyboard is dismissed. |
Example
search.searchQueryChanges() // Flow<String>
.map { it.toLowerCase(Locale.getDefault()) }
.onEach { query -> filter.updateItems(query) }
.flowWithLifecycle(lifecycle)
.launchIn(scope)
More examples in source code