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.

Using binding expressions

Using binding expressions - Android Tutorial

From the course: Android Development: Data Binding

Start my 1-month free trial

Using binding expressions

- [Instructor] Let's take what we've learned about binding expressions and update our simple example to use some of the techniques we've seen. So let's start by finishing the data bindings that we haven't yet set up from the previous example. So if we scroll down here in the simple example layout, you can see here in the data model, we've got temperature, conditions, wind chill. And so here in the layout, we've already done temperature. So let's add the others. So here for current conditions, let's add the conditions and that's the string. So we can just connect that directly and that's going to be weather.conditions. All right. And then there's wind chill and wind chill is also in integers. That's got to be converted. So we'll do the same thing that we did before. Let's see, String.valueOf, and that's going to be weather.windchill. All right, I'll close that one off. Okay. We can use the properties available to…

Contents