Re:Building quality software for Android - A post-mortem for...
by huggyface on Tuesday June 05, 2012 @02:04PM
(#4069889)
How do you get buttons to occupy a percentage of the screen
In a LinearLayout take a look at layout_weight -- it is the key (or rather, one of the keys) to goodness. It really is an onion, and if you can get through the crying the flexibility comes in the layers.
Re:Building quality software for Android - A post-mortem for...
by Dove on Tuesday June 05, 2012 @03:00PM
(#4070228)
Oh dear! That's really not the answer I was hoping for. That's about where I gave up last time -- somewhere around a dozen nested vertical and horizontal linear layouts with various weights, gravities and alignments that still wasn't giving me quite what I wanted.
Still, for correcting me on the button background thing alone, I suspect you've added years to my life. Dunno what the online equivalent of buying you a drink is, but . . . thank you.
That . . . actually works! Well, now I'm embarrassed. I had previously had to go this route http://www.androidworks.com/changing-the-android-edittext-ui... with text fields, and assumed it was the only way.
How do you get buttons to occupy a percentage of the screen (I hesitate to ask, as it's probably something similarly trivial . . . but it's been such a painful subject for me that I really want to know!)?