Skip to content

Instantly share code, notes, and snippets.

@kozmi55
Last active August 3, 2018 12:59
Show Gist options
  • Save kozmi55/ecacbc577e50846c96447b56fcd821ed to your computer and use it in GitHub Desktop.
Save kozmi55/ecacbc577e50846c96447b56fcd821ed to your computer and use it in GitHub Desktop.
@BindingAdapter("data")
fun <T> setRecyclerViewProperties(recyclerView: RecyclerView, data: T) {
if (recyclerView.adapter is BindableAdapter<*>) {
(recyclerView.adapter as BindableAdapter<T>).setData(data)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment