Created
March 31, 2021 01:46
-
-
Save pauloaapereira/7b1f337660864b62ac8b13fb4f43f458 to your computer and use it in GitHub Desktop.
Jetpack Compose - Auto Complete Search Bar_9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val items = listOf( | |
"Paulo Pereira", | |
"Daenerys Targaryen", | |
"Jon Snow", | |
"Sansa Stark", | |
) | |
val autoCompleteEntities = items.asAutoCompleteEntities( | |
filter = { item, query -> | |
item.toLowerCase(Locale.getDefault()) | |
.startsWith(query.toLowerCase(Locale.getDefault())) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment