Here is a couple ways:
1 - RelativeLayout:
<RelativeLayout fill_parent, fill_parent
<LinearLayout
id="@+id/top_bar"
layout_height="wrap_content"
* layout_alignParentTop="true"*
> ... </>
<LinearLayout
id="@+id/bottom_bar"
layout_height="wrap_content"
* layout_alignParentBottom="true"*
> ... </>
<MiddleView
layout_height="doesn't matter"
* layout_below="@id/top_bar"
layout_above="@id/bottom_bar"*
> ... </>
</RelativeLayout>
2 - LinearLayout
<LinearLayout fill_parent, fill_parent, vertical
<LinearLayout
id="@+id/top_bar"
layout_height="wrap_content"
** > ... </>
<MiddleView
***layout_**height="wrap_content"
layout_weight="1"*
> ... </>
<LinearLayout
id="@+id/bottom_bar"
layout_height="wrap_content"
** > ... </>
</LinearLayout>
-- Kostya
24.12.2010 19:34, John Lussmyer ?????:
I'm used to Java Swing layout managers (especially GridBagLayout), and
I haven't been able to figure out to do something relatively simple
with the Android layouts.
I want to have a bar of controls at the top, and another bar of
controls at the bottom.
Then I want to have an area in the middle that uses whatever space is
left over. (mainly for graphics drawing)
I'm currently using a RelativeLayout with 2 Linear layouts for the top
and bottom.
I just haven't been able to find a combination of layouts that lets me
have a view just fill the middle remainder area.
I'm trying to start with a simple background color on a view in this area.
if I use "wrap_content" it's way too small.
If I use "fill_parent" it fills the ENTIRE parent, including the areas
used by the 2 bars of controls.
How do I define something to just fill the remaining space in the middle?
--
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
--
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 [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