"Form data in android xml example"
<TextView android:text="@{viewmodel.name}"/>
<TextView android:text="@={viewmodel.name}"/>
"Form data in android xml example"
<TextView android:text="@{viewmodel.name}"/>
<TextView android:text="@={viewmodel.name}"/>
you can use @={} for two way data binding in attributes like onClick or onChangeText ,... of your views in xml file and can't use that in Text or Color Attributes. but you can use @{} for one way data binding in Text or Color attributes. because 2 way data binding means when user change the view with his action in app and we want to change our data in our repository or database with data binding.
@={} use for attributes like onClick or onChangeText and etc for 2 way data binding.
@{} use for attributes like Text, Color and etc for 1 way data binding.
android:text="@{viewmodel.name}"
is the syntax for 1-way bindingandroid:text="@={viewmodel.name}"
is the syntax for 2-way bindingwhile the first is read-only, the 2nd allows you to update the value of the field in your viewmodel