Android Development: Data Binding
1h 8mIntermediate2020-11-19
Authors

Joe Marini
Senior Developer Advocate at Google, Developer
Course details
Android data binding architecture components make it easier to connect an application's data with application layouts. This eliminates an excess of boilerplate code and leads to more modular programs with greater separation of data and presentation. In this course, explore the benefits of data binding for Android developers, as well as how to enable data binding for your own app. Learn how to create a data model and add data binding support to your Android layout file. Discover how to use binding expressions to manipulate data values directly within an Android layout; bind to observable data sources to ensure that changes are automatically reflected in the layout; use binding adapters; and more.
Skills covered
Software Design PatternsAndroid DevelopmentAndroidMobile DevelopmentGoogleSoftware DevelopmentDeep Dive (X:Y)
Concepts
Introduction
- Simplify your data-driven layouts
- What you should know
- Getting set up
Overview
- What is data binding
- Doing things the old way
- Setting up your project
Basic Data Binding
- Create binding layout
- Create databound activity
Layout Expressions
- The binding expression language
- Using binding expressions
- Challenge - String concatenation expression
- Solution - String concatenation expression
Binding to Observable Data
- Overview of observables
- Binding to observables
- Binding to ViewModels
- Using binding adapters
- Two-way binding syntax
- Using converters
- Challenge - Color binding adapter
- Solution - Color binding adapter
Conclusion
- Next steps