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 Adding the Upper Half

william kenny
william kenny
5,428 Points

alignTop or alignBottom

in the video Ben shows the xml as android:layout_alignBottom="@+id/locationLabel"

but when I do that, it looks quite odd until I switch it to: android:layout_alignTop="@+id/locationLabel"

looking at the mockup, it looks like icon should be aligned with the text which is at the top of the locationLabel view. What am i missing?

1 Answer

Andres Badilla
Andres Badilla
4,692 Points

You aren't missing anything and you should be able to do it either way however, as Ben advised, it is ideal to go from the center all the way to the borders. Call it a "best practice" to design your view, specially considering all different screen sizes