如何在 LinearLayout 中拉伸子元素
我有 LinearLayout,我试图使子元素为 100%。 到目前为止,我已经有了这个
[E1] [E2] [E3]
,而我希望它们是
[E1]
[E2]
[E3]
我应该更改的属性?我尝试了几个,例如layout_width
I have LinearLayout, and I am trying to make the child elements to be 100%.
so far I have this
[E1] [E2] [E3]
while I want them to be
[E1]
[E2]
[E3]
what properties should I change?? I tried several such as layout_width
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 LinearLayout 方向设置为垂直
并使所有元素填充父级。
Set LinearLayout orientation to vertical
And make all elements fill parent.
您应该将 LinearLayout 的方向属性更改为垂直
You should change orientation property of your LinearLayout to vertical