Use RelativeLayout and use the android:layout_below attribute on the
buttons to put it below the gridview.  Then the sizing will take care of
itself.

http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Mon, Mar 26, 2012 at 10:55 PM, Put_tiMe <[email protected]> wrote:

> I have a situation where I need to have a GridView on the top part and
> buttons below it.
>
> If it was the other way around, then, it would have been easy. i.e.
> buttons on top and gridview below it.
> For the gridview, I could have mentioned:
>
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>
> and it would have worked just fine.
>
>
> But I got to have the buttons below the grid view.
> So now, how do I size the grid view? Can I mention it in screen height
> percentage?
>
> Cause if I use "wrap_content", then the gridview takes up the entire
> screen and the buttons are not visible.
>
> And I want it to look even on all screen sizes.
>
>
>
>
> --
> 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

-- 
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