Last active
April 21, 2021 15:14
-
-
Save milhauscz/867092b927f2fec20c4f62195aabe21a to your computer and use it in GitHub Desktop.
Example of a custom binding adapter for Material Spinner
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
@BindingAdapter("items") | |
fun bindItems(view: MaterialSpinner, items: List<ExampleItem>?) { | |
if (items == null) return | |
view.setAdapter(ExampleSpinnerArrayAdapter(view.context, items)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment