On Sun, Apr 29, 2012 at 5:42 AM, JTeagle <[email protected]> wrote:
> I'm using RelativeLayout to create rows of controls and would like to
> achieve the following:
>
>     Widget 1 - natural height
>     Custom view - remaining space after Widgets 1 and 3
>     Widget 3 - natural height

Widget 1 has android:alignParentTop="true" and
android:layout_height="wrap_content".

Widget 3 has android:alignParentBottom="true" and
android:layout_height="wrap_content".

Widget 2 has android:above pointing to widget 3, android:below
pointing to widget 1, and (AFAIK) whatever android:layout_height you
want (as the above/below rules will override it)

This should work so long as Widget 1 and Widget 3 have knowable
heights (e.g., Button, not ListView) and there is still room on the
screen for Widget 2.

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

Android Training...At Your Office: http://commonsware.com/training

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