Bind layout views to Architecture Components

The AndroidX library includes the Architecture Components, which you can use to design robust, testable, and maintainable apps. The Data Binding Library works seamlessly with the Architecture Components to further simplify the development of your UI. The layouts in your app can bind to the data in the Architecture Components, which help you manage the UI controller's lifecycle and notify the UI about changes in the data.

This page shows how to incorporate the Architecture Components into your app to get the most from using the Data Binding Library.

Use LiveData to notify the UI about data changes

You can use LiveData objects as the data binding source to automatically notify the UI about changes in the data. For more information about this Architecture Component, see the LiveData overview.

Unlike objects that implement