Android布局部门(Android Layout Division)

编程入门 行业动态 更新时间:2024-10-28 00:19:17
Android布局部门(Android Layout Division)

我想将屏幕分为两部分,我有一个LinearLayout ,它又包含两个LinearLayouts 。

如何将这两个LinearLayouts分成两个相等的部分?

I want to divide my screen in two parts,I have a LinearLayout and it contains two LinearLayouts again.

How to divide these two LinearLayouts into two equal parts?

最满意答案

只需添加:

android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"

他们两个。 相等的layout_weight参数均匀分配空间量。

努力接受你之前的问题的一些答案。

Just add:

android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"

to both of them. The layout_weight parameter being equal distributes the amount of space evenly.

Work on accepting some of the answers to your previous questions, as well.

更多推荐

本文发布于:2023-08-06 01:41:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1442085.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:布局   部门   Android   Layout   Division

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!