android之RelativeLayout

本文详细介绍了RelativeLayout中用于定义视图间位置关系的各种规则,包括如何将控件与父容器或其他子视图对齐的方式,例如顶部对齐、底部对齐等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 
Constants
intABOVERule that aligns a child's bottom edge with another child's top edge.
将改控件的底部至于给定ID的控件之上
intALIGN_BASELINERule that aligns a child's baseline with another child's baseline.

intALIGN_BOTTOMRule that aligns a child's bottom edge with another child's bottom edge.
intALIGN_LEFTRule that aligns a child's left edge with another child's left edge.
将改空间的左边缘和给定ID的控件的左边缘对齐
intALIGN_PARENT_BOTTOMRule that aligns the child's bottom edge with its RelativeLayout parent's bottom edge.
intALIGN_PARENT_LEFTRule that aligns the child's left edge with its RelativeLayout parent's left edge.
intALIGN_PARENT_RIGHTRule that aligns the child's right edge with its RelativeLayout parent's right edge.
intALIGN_PARENT_TOPRule that aligns the child's top edge with its RelativeLayout parent's top edge.
intALIGN_RIGHTRule that aligns a child's right edge with another child's right edge.
intALIGN_TOPRule that aligns a child's top edge with another child's top edge.
intBELOWRule that aligns a child's top edge with another child's bottom edge.
将改控件的底部至于给定ID的控件之下
intCENTER_HORIZONTALRule that centers the child horizontally with respect to the bounds of its RelativeLayout parent.
intCENTER_IN_PARENTRule that centers the child with respect to the bounds of its RelativeLayout parent.
intCENTER_VERTICALRule that centers the child vertically with respect to the bounds of its RelativeLayout parent.
intLEFT_OFRule that aligns a child's right edge with another child's left edge.
将改空间的右边缘和给定ID的控件的左边缘对齐
intRIGHT_OFRule that aligns a child's left edge with another child's right edge.
将改空间的左边缘和给定ID的控件的右边缘对齐
intTRUE

转载于:https://www.cnblogs.com/tiankonguse/archive/2012/08/13/2636717.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值