From the course: Android Development: Data Binding
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The binding expression language - Android Tutorial
From the course: Android Development: Data Binding
The binding expression language
- [Instructor] Now that we have seen how to create data bound layouts with binding expressions, let's take a closer look at the binding language syntax that is used to connect layout fields with data objects. Binding expressions within the layout are enclosed in an at sign with two curly braces for one way binding and an at equals sign with two curly braces for two way binding, which we'll examine later in the course. You can use these binding expressions to connect data values to attributes within the layout, and we've already seen how to do this using a text view. Now, it's important to understand that there's no magic to data binding, under the hood, the generated code that results from a binding expression simply gets passed to a setter function that will set the value into the specified attribute. So for this reason, the type that is returned from the binding expression has to match the type that is expected by…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.