Quantcast
Channel: Pragmatic Forums | Posts in topic 'Nested LinearLayout tags'
Viewing all articles
Browse latest Browse all 22

Nested LinearLayout tags posted by Ed Burnette @ Thu, 22 Oct 2009 20:43:51 +0000

$
0
0

Hi Bill. There are other ways to achieve the effect but I was trying to get some padding all the way around the outside of the screen. The first LinearLayout causes whatever is in it to be drawn with 30 units of padding around it.

Inside there, the second LinearLayout makes the text and buttons it contains stack one on top of the other. It says layout_width=”fill_parent”, which would normally make the buttons go all the way to the left and right sides of the screen. But because of the first LinearLayout, there’s a little space between the buttons and the edge.

I made this layout through trial and error, really. You wouldn’t believe how much time I wasted making little changes, saving, seeing what it looked like, and repeating. And then I went back and simplified it as much as I could. Unfortunately the Android plug-in doesn’t currently include a GUI editor, but you can find the next best thing in a little Java applet called DroidDraw (http://www.droiddraw.org).


Viewing all articles
Browse latest Browse all 22

Latest Images

Trending Articles





Latest Images