Created
January 14, 2019 14:27
-
-
Save tfcporciuncula/e63a1784b341dd28e56d24afd3340418 to your computer and use it in GitHub Desktop.
DataBindingViewHolder
This file contains hidden or 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
class DataBindingViewHolder<T>(private val binding: ViewDataBinding) : | |
RecyclerView.ViewHolder(binding.root) { | |
fun bind(item: T) { | |
binding.setVariable(BR.item, item) | |
binding.executePendingBindings() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment