The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
To quote Rudyard Kipling:
East is East and West is West, and never the twain shall meet
In many programming environments, including classical Android development,
one could paraphrase Kipling as “models are models and views are views, and never
the twain shall meet, except by means of some controller or presenter or
something”. The result is a fair amount of code that populates views with
model-supplied data and updates those models as the user alters the data
in the views (e.g., types something in an
Data binding, in general, refers to frameworks or libraries designed to help simplify some of this data migration, where the definitions of the models and views can be used to automatically “bind” them without as much custom controller- or presenter-style logic.
Interest in data binding spiked in 2015, when Google released the first beta editions of data binding support via Android Studio, the Android Gradle Plugin, and a new data-binding support library.
This chapter explores Google’s data binding support and how to use it to simplify your Android app development.
This chapter requires that you have read the core chapters of this book.
In particular, the sample apps are based off of samples from
the chapter on Internet access. Also, some samples
The preview of this section was lost in the sofa cushions.
The preview of this section was stepped on by Godzilla.
The preview of this section apparently resembled a Pokémon.
The preview of this section is presently indisposed.
The preview of this section is out seeking fame and fortune as the Dread Pirate Roberts.
The preview of this section is sleeping in.
The preview of this section was fed to a gremlin, after midnight.