First introduced at Google I/O in 2015, Data Binding brought much excitement to Android developers. Because accessor methods can be placed directly into the XML, it allows for less boilerplate code, more testing, and direct object usage. Data binding has been around for other platforms for some time now, and it only made sense to bring it to Android.
Before we get into some tips and tricks, take the time to make sure that you have your objects and project set up correctly. Since some of our work here at Wunderman Thompson Apps is with sports apps, I’m going to use a Team object as the view model like so: