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

--

--

Open Sourcer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store