Android LinearLayout fill-the-middle

Turned out (Thanks Mark Murphy for the answer) that all I was looking for was to set middle row to

layout_height=”0px” and layout_weight=”1″

If, after all the wrap_content and fixed-sized items are allocated for
along an axis (horizontal or vertical), there is still room on that axis
left over, LinearLayout then allocates the remaining space to those
widgets with specified weights, in proportion to the weight.

Leave a Comment

tech