问题
I've got a problem concerning android layouts.
In my xml file I have two relative layouts. One is attached to the top by android:layout_alignParentTop="true".
The other one is attached to the bottom by android:layout_alignParentBottom="true".
Now there's a lot of space between these two views. I'd like two fill this remaining space with a FrameLayout where a couple of different fragments should be displayed.
Does anybody know how to fill the space I described?
Thanks a lot!
回答1:
<FrameLayout android:layout_below="@+id/toplayout"
android:layout_above="@+id/bottomlayout"/>
回答2:
add your frame layout and set its property
< android:layout_above="@+id/top"
android:layout_below="@+id/bottom" >
so the frame layout will occupy thw whole space between these two layouts
来源:https://stackoverflow.com/questions/9700886/how-to-fill-the-remaining-space-between-two-layouts