Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,684 Members 48,142 Now Online
XDA Developers Android and Mobile Development Forum

Best way to learn layouts?

Tip us?
 
sega dude
Old
#1  
Member - OP
Thanks Meter 3
Posts: 56
Join Date: Sep 2011
Default Best way to learn layouts?

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.
My Devices:
Craig CMP738a with official 2.2 rom.
LG Optimus F3 with stock 4.1.2 rom rooted with towelroot
Toshiba Thrive with stock ICS rom.
B&N Nook Simple Touch with GlowLight rooted with NookManager
Try my Web Browser, Brandsonic Web! Available for Mac, Windows , iOS and Android!
 
SimplicityApks
Old
#2  
SimplicityApks's Avatar
Senior Member
Thanks Meter 327
Posts: 323
Join Date: May 2013
Location: Aachen
Quote:
Originally Posted by sega dude View Post
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes