如何填写两个布局之间的剩余空间 [英] How to fill the remaining space between two layouts

查看:144
本文介绍了如何填写两个布局之间的剩余空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有关于Android的布局问题。

在我的xml文件我有两个相对的布局。一个是由机器人附连到顶部。layout_alignParentTop =真

另一种是由机器人附连到下:layout_alignParentBottom =真

现在有很多这两种观点之间的空间。我想两个填充这个剩余的空间应该显示几个不同片段的的FrameLayout。

有谁知道怎么填我所描述的空间?

非常感谢!


解决方案

 <的FrameLayout机器人:layout_below =@ + ID / toplayout
   机器人:layout_above =@ + ID / bottomlayout/>

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!

解决方案

<FrameLayout android:layout_below="@+id/toplayout" 
   android:layout_above="@+id/bottomlayout"/>

这篇关于如何填写两个布局之间的剩余空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆