About

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 ObservableField.
* Approach 2: Extending BaseObservable and notifying the view of a change.
* The benefits and downsides to each approach.

Something went wrong

Lesson added to
playlist

Create new playlist

We've got you covered

At Caster.IO we provide the best hyper focused & bite-sized development training available. Our goal is to
not waste your time, but to give more of it to you. From implementing a new pattern to learning a new technology,
we've got you covered.