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()
}
}

DeFi Punk

Love podcasts or audiobooks? Learn on the go with our new app.