From the course: Android Development: Data Binding
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Solution: String concatenation expression - Android Tutorial
From the course: Android Development: Data Binding
Solution: String concatenation expression
(upbeat music) - [Instructor] All right, let's take a look at how I decided to solve this particular challenge. And keep in mind, it's not important that your solution matches mine. There are usually lots of different ways to solve programming problems. And the main point here is to learn from a given solution and then compare it to your own. So let's open up the simple activity here, and I'm going to open up the sample weather data to show you my solution. All right so for my solution, I decided to repurpose the convert to F function that we created earlier in the chapter. And I also decided to use string concatenation directly within the layout. Building up the results by using the addition operations let's go over to the layout. And let's collapse that down to have some more room. So if we scroll down, you'll see here on line 33 that I've got the value of the weather temperature, right? And then I'm using string…
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.