Best way to learn layouts?

Search This thread

SimplicityApks

Senior Member
May 26, 2013
354
344
Aachen
I seem to be really struggling with Android layouts. It's very complicated (compared to iOS) and I just can't figure it out. So, what is the best way to learn layouts? Any help would be greatly appreciated.

I assume you've read through the first app's layout training? For sure Android layouts are a bit more complex than the iOS one where you just place an item on the screen at specific pixel coordinates, but it's really not that complcated once you understand the basics. Android has to deal with many different screen sizes, orientations and pixel densities. That is why a simple approach with placing the views at specific pixel positions is not that great (but is still possible - don't use that). Instead, you have to think how is the views position relative to another in a RelativeLayout, or divide your app's UI into rows with LinearLayouts.

Here's an overview about these ViewGroups, but there are many great tutorials for instance here or here on vogella.

If you have a more specific question, just ask here ;)