Neilz wrote:
> layout_width="0px"
>
>
> That's all it needed. G.
>
>
> I guess it's just one of the tricks of the trade that you either know
> or you don't. I mean, that's not logical, is it?!
Let's say you use layout_width="wrap_content" and layout_weight="1". The
calculation then goes so
Nellz,
It is somewhat logical. It works as long as you have the width the
same across all items. If you use WRAP_CONTENT, then it fails since
everything is different sizes and then they all evenly distribute the
extra space.
Thanks
Mike
On Mar 16, 10:25 am, Neilz wrote:
> layout_width="0px"
>
>
layout_width="0px"
That's all it needed. G.
I guess it's just one of the tricks of the trade that you either know
or you don't. I mean, that's not logical, is it?!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this grou
Neilz wrote:
> Nope, I give up. I've spend way too many hours on this today :-(
>
> Here's a challenge for anyone who fancies it:
> -
>
> Create a layout which places five buttons across the screen, of
> exactly equal size, filling all space, that say "
Nope, I give up. I've spend way too many hours on this today :-(
Here's a challenge for anyone who fancies it:
-
Create a layout which places five buttons across the screen, of
exactly equal size, filling all space, that say "One", "2", "3" "Four"
"5".
I tried TableLayout, but it didn't really help, as the columns
adjusted the size depending on the text in the buttons! I think
sticking with LinearLayouts and layoutWeight should get me what I
want, I'll just have to keep tinkering.
--
You received this message because you are subscribed to the G
Have you considered using TableLayout? I've never used it but it
sounds promising for what you want to do.
Chrigi
On Tue, Mar 16, 2010 at 1:32 PM, Neilz wrote:
> I see. Thanks Mark.
>
> That's frustrating, as View does some really useful things that I
> can't get other view types to do.
>
> Basi
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
I see. Thanks Mark.
That's frustrating, as View does some really useful things that I
can't get other view types to do.
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
9 matches
Mail list logo