RelativeLayout布局
2016-03-01 23:21
253 查看
RelativeLayout布局中
android:layout_centerHorizontal="true" --将控件置于水平方向的中心位置
其他属性有:
android:layout_above="@id/xxx" --将控件置于给定ID控件之上
android:layout_below="@id/xxx" --将控件置于给定ID控件之下
android:layout_toLeftOf="@id/xxx" --将控件的右边缘和给定ID控件的左边缘对齐
android:layout_toRightOf="@id/xxx" --将控件的左边缘和给定ID控件的右边缘对齐
android:layout_alignLeft="@id/xxx" --将控件的左边缘和给定ID控件的左边缘对齐
android:layout_alignTop="@id/xxx" --将控件的上边缘和给定ID控件的上边缘对齐
android:layout_alignRight="@id/xxx" --将控件的右边缘和给定ID控件的右边缘对齐
android:layout_alignBottom="@id/xxx" --将控件的底边缘和给定ID控件的底边缘对齐
android:layout_alignParentLeft="true" --将控件的左边缘和父控件的左边缘对齐
android:layout_alignParentTop="true" --将控件的上边缘和父控件的上边缘对齐
android:layout_alignParentRight="true" --将控件的右边缘和父控件的右边缘对齐
android:layout_alignParentBottom="true" --将控件的底边缘和父控件的底边缘对齐
android:layout_centerInParent="true" --将控件置于父控件的中心位置
android:layout_centerVertical="true" --将控件置于垂直方向的中心位置
android:layout_centerHorizontal="true" --将控件置于水平方向的中心位置
其他属性有:
android:layout_above="@id/xxx" --将控件置于给定ID控件之上
android:layout_below="@id/xxx" --将控件置于给定ID控件之下
android:layout_toLeftOf="@id/xxx" --将控件的右边缘和给定ID控件的左边缘对齐
android:layout_toRightOf="@id/xxx" --将控件的左边缘和给定ID控件的右边缘对齐
android:layout_alignLeft="@id/xxx" --将控件的左边缘和给定ID控件的左边缘对齐
android:layout_alignTop="@id/xxx" --将控件的上边缘和给定ID控件的上边缘对齐
android:layout_alignRight="@id/xxx" --将控件的右边缘和给定ID控件的右边缘对齐
android:layout_alignBottom="@id/xxx" --将控件的底边缘和给定ID控件的底边缘对齐
android:layout_alignParentLeft="true" --将控件的左边缘和父控件的左边缘对齐
android:layout_alignParentTop="true" --将控件的上边缘和父控件的上边缘对齐
android:layout_alignParentRight="true" --将控件的右边缘和父控件的右边缘对齐
android:layout_alignParentBottom="true" --将控件的底边缘和父控件的底边缘对齐
android:layout_centerInParent="true" --将控件置于父控件的中心位置
android:layout_centerVertical="true" --将控件置于垂直方向的中心位置
相关文章推荐
- Ad Hoc Distributed Queries / xp_cmdshell 的启用与关闭
- 作品第四课----css函数一设置/读取对象的属性
- 国际化模块 angular-translate 简单方便快捷翻译中英文等多语言环境
- ecshop商品属性仿淘宝选择功能
- 排序算法之冒泡排序
- Draw 9-patch
- 获取节点、父节点、兄弟节点
- 4.5.3 Go Android 下拉刷新的整理:SwipeRefreshLayout,android-Ultra-Pull-To-Refresh(ptr),PullToRefreshListView
- 第一篇blog
- POJ 1740 A New Stone Game(多堆博弈找规律)
- Linux驱动学习笔记(1)----模块
- 边看书边做边发挥-图书软件-1
- Java排序六:堆排序
- 紫书 p108 例题5-1
- Xcode 报错clang- error- linker command failed with exit code 1 (use -v to see invocation)总结
- 在 Mac 中开启自带的 Apache
- 老男孩28期运维张帅学习Linux决心书
- nginx命令:启动,停止及改变配置重启
- android docs 打开提速
- java菜鸟须知