tags:

views:

47

answers:

1

Hi, I'm extremely new to Android and just trying to get my head around these layouts.

I've got several tabs which contain a LinearLayout with a TabWidget and FrameLayout as children. In the FrameLayout I'd like a certain percentage at the bottom of the screen to be reserved for a table, the rest above to be filled with an image.

How can I replicate this in the Android XML?

Any ideas much appreciated.

A: 

Inside of the FrameLayout, put a LinearLayout. In the LinearLayout, have your "table" (TableLayout?) and image (ImageView?). Set the table's and image's android:layout_height="0px" and android:layout_weight to be whatever percentage you want for each.

CommonsWare
Thanks! That works perfectly. I'd misunderstood the layout_weight to be some kind of priority of size - ie this widget is more important than that one - rather than an actual proportion.
jFort