11.01.2011 11:14, mort пишет:
There doesn't seem to be any simple,
reliable, always working way to get buttons use exactly the given
percentage of the available space.

This works for me: a LinearLayout with two children (let's call them left/right). Set both children's width to "0dp" and layout_weight to equal values. Yes, you read that right, that's ZERO dp.

This has two drawbacks though: the linear layout has to be wide enough on its own (i.e. fill_parent) and if one child is too wide to fit in 1/2 of parent's width, it's going to get clipped.

I'd love to see support for equally or proportionally sized views in Relative or some other layout...

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to