微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Android笔记:线性布局和相对布局RelativeLayout

线性布局

layout_width  宽度  wrap_content  内容有多少,宽度有多少

         match_parent  匹配父空间

layout_height  高度

layout_weight  权重  

orientation  布局(线性布局独有) vertical  垂直

            horizontal  水平

background  背景

padding  内边距

margin  外边距

gravity 对齐方式  bottom、right、center、center_vertical等

 

相对布局

layout_toLeftOf  相对左

layout_toRightOf  相对右

layout_layout_below  相对下

layout_alignBottom  底部对齐

layout_alignParentBottom  和父空间底部对齐

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐