Skip to content

Instantly share code, notes, and snippets.

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