Great UI's and Less code with the DataBinding Library
This presentation was made during the DevFest organized by the GDG Nairobi and it aims to provide a starting point on what is the Data Binding Library and how to get started.
no longer a ViewGroup but instead a Layout tag. Our view hierarchy is now a child of the layout tag. A new data tag was added as the child of the layout tag. Things to notice
events 1. Create a simple class with methods representing the different behaviours we might want when handling events. 2. Declare a new variable on the data tag of the layout file of the type of our handler 3. Declaratively define the expression to call the handler on one of the listeners of the view. 4. Define set the handler to the Binding Class on the java code
class into our layout file. 2. We have to specify the full package name of the class we want to import. 3. All classes from java.lang.* are automatically available without the need of importing.