Easy example showing how to create TwoWay Data Binding using Android Data Binding Library.
<data>
<variable
name="viewModel"
type="net.droidlabs.twowaydatabinding.ViewModel"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:binding="@{viewModel.someText}"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:binding="@{viewModel.someText}"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.someText}"
/>
</LinearLayout>