Neilz wrote:
> That's frustrating, as View does some really useful things that I
> can't get other view types to do.

That sentence doesn't make a lot of sense to me, considering that View
doesn't do anything other than draw a background, AFAICT.

> Basically I'm trying to set up a grid of buttons (say 4 * 4 for
> example), where the buttons are exactly equal in size, regardless of
> the text within them, and together fill the parent view. View is
> really good at filling its parent view, when used with layout_weight,
> but if I change them to LinearLayout I lose that control - the buttons
> start wrapping on the text, etc.
> 
> I don't want to use specific widths and heights, as this won't be
> helpful when testing on different devices, but I want the buttons to
> naturally fit the available space with equal sizes.
> 
> Any suggestions?

Use android:layout_weight to divide up the space among the Buttons in a
row and among the LinearLayouts in a column.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Beginning Android_ from Apress Now Available!

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

Reply via email to