I am getting started for using DataBinding
feature. I am facing problem with it.
Error:(21, 9) error: cannot find symbol class ContactL
Make sure the name for your model and the reference have the same name:
For example, name="item" must match android:checked="@={item.checked}"
<data>
<variable
name="item"
type="com.simone.mywordlist.model.MyModel" />
</data>
<Switch
android:id="@+id/my_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="@={item.checked}"
/>
Your layout name is in snake_case.
activity_login.xml
Then your binding class name will be in CamelCase.
ActivityLoginBinding.java
Also build project after creating layout. Sometimes it is not generated automatically.