I have following fragment class written in Java using the new databinding library
import com.example.app.databinding.FragmentDataBdinding;
public class Data
Add Databinding in android Project using when you have use kotlin language.
Below steps
--First you need to add the below plugin
**apply plugin: 'kotlin-kapt'**
--Second dataBinding enabled true
**dataBinding {
enabled = true
}**
All this point added in app.build.gradle after hit "SYNC NOW"
Lets For example you have edit profile activity then how to define binding variable in kotlin??
lateinit var buildProfileBinding: ActivityBuildProfileBinding
buildProfileBinding = getBinding()
Here,get binding is method to handle which type of binding object
protected T getBinding() {
return (T) binding;
}