Adam Hurwitz
1 min readAug 9, 2018

--

Thanks George! I just finished implementing full data binding for a FirestorePagingAdapter in Kotlin. Not counting imports or brackets my ViewHolder for the app will be 5 lines of code! All logic from the adapter can now be handled cleanly in the ViewModel.

class ViewHolder(private var binding: ViewDataBinding) : RecyclerView.ViewHolder(binding.root) {
fun bind(obj: Any) {
binding.setVariable(BR.obj, obj)
binding.executePendingBindings()
}
}

--

--

Adam Hurwitz

An account about nothing | Researcher and product consultant