Databinding in RecyclerView - Android - Kotlin
Hey Guyss!! Already we have seen the basics of Databinding and how to use it in previous post . Now let's see how to use Databinding in RecyclerView . And Its gonna be a short post. ;) You can find the Project in GitHub . Prerequisite: build.gradle First, we have enable dataBinding in app-level build.gradle android { dataBinding { enabled = true } } Next, we have add the following plugin. apply plugin: 'kotlin-kapt' Next, we have to include dependency for databinding, (Not needed, if using Android Studio 3.2 or above, since its already bundled) kapt "com.android.databinding:compiler:3.2.0-alpha10" Implementation: We can directly bind the data to RecyclerView's Adapter layout. So, let's design the