Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Building the Weather UI Finishing the Lower Half

Soumitra Mehrotra
Soumitra Mehrotra
337 Points

Why are we writing value directly under Text??

We could have written those value under Text tools because we are going to change the values anyway, just like we did in Interactive Story app?

1 Answer

Boban Talevski
Boban Talevski
24,793 Points

I was wondering myself the same thing throughout the videos. But in the end (in this case), it doesn't really matter that much as we are going to populate those values dynamically in code anyway.

On second thought, the reason to use text instead of tools:text might have to do with the fact that we would want to have something there in case our app has internet access issues on startup. So without having any data retrieved most of the screen would be empty (provided we do allow for the screen to show without internet access) and would look weird. Not that having hard coded values that don't have anything to do with actual weather conditions isn't also weird, but guess it's a matter of design choice, which one would look "less broken" :).