Two way binding is a powerful feature of Android Data Binding that allows you to bind inputs, like an
EditText, to data in a ViewModel while also updating that data back on the ViewModel as the user interacts with it. This means that any changes the user makes to your two way bound inputs, will be reflected in the ViewModel right away and any changes that the ViewModel makes, will be reflected in the View. This lesson will teach you how to do this.
Key concepts in this lesson that you will learn:
* How to two way bind an Edit text to a ViewModel backed variable.
* Two approaches to keeping your View in sync with updates to those variables.
* Approach 1: Using an
* Approach 2: Extending
BaseObservable and notifying the view of a change.
* The benefits and downsides to each approach.