RelativeLayout各个属性

  1. android:layout_above="@id/xxx"  --将控件置于给定ID控件之上
  2. android:layout_below="@id/xxx"  --将控件置于给定ID控件之下
  3. android:layout_toLeftOf="@id/xxx"  --将控件的右边缘和给定ID控件的左边缘对齐
  4. android:layout_toRightOf="@id/xxx"  --将控件的左边缘和给定ID控件的右边缘对齐
  5. android:layout_alignLeft="@id/xxx"  --将控件的左边缘和给定ID控件的左边缘对齐
  6. android:layout_alignTop="@id/xxx"  --将控件的上边缘和给定ID控件的上边缘对齐
  7. android:layout_alignRight="@id/xxx"  --将控件的右边缘和给定ID控件的右边缘对齐
  8. android:layout_alignBottom="@id/xxx"  --将控件的底边缘和给定ID控件的底边缘对齐
  9. android:layout_alignParentLeft="true"  --将控件的左边缘和父控件的左边缘对齐
  10. android:layout_alignParentTop="true"  --将控件的上边缘和父控件的上边缘对齐
  11. android:layout_alignParentRight="true"  --将控件的右边缘和父控件的右边缘对齐
  12. android:layout_alignParentBottom="true" --将控件的底边缘和父控件的底边缘对齐
  13. android:layout_centerInParent="true"  --将控件置于父控件的中心位置
  14. android:layout_centerHorizontal="true"  --将控件置于水平方向的中心位置
  15. android:layout_centerVertical="true"  --将控件置于垂直方向的中心位置
时间: 2024-07-30 10:09:13

RelativeLayout各个属性的相关文章

Android中RelativeLayout各个属性的含义

androidlayout android:layout_above="@id/xxx"        --将控件置于给定ID控件之上 android:layout_below="@id/xxx"        --将控件置于给定ID控件之下 android:layout_toLeftOf="@id/xxx"     --将控件的右边缘和给定ID控件的左边缘对齐 android:layout_toRightOf="@id/xxx&quo

Android中RelativeLayout各个属性

Android中RelativeLayout各个属性 android:layout_alignParentLeft=”true”找不到有时候 2014年09月05日 ⁄ 综合 ⁄ 共 945字 ⁄ 字号 小 中 大 ⁄ 评论关闭 android:layout_above="@id/xxx"  --将控件置于给定ID控件之上android:layout_below="@id/xxx"  --将控件置于给定ID控件之下 android:layout_toLeftOf=&

(转)Android中RelativeLayout各个属性的含义

转:http://blog.csdn.net/softkexin/article/details/5933589 android:layout_above="@id/xxx"  --将控件置于给定ID控件之上android:layout_below="@id/xxx"  --将控件置于给定ID控件之下 android:layout_toLeftOf="@id/xxx"  --将控件的右边缘和给定ID控件的左边缘对齐android:layout_t

linearLayout 和 relativeLayout的属性区别

LinearLayout和RelativeLayout 共有属性: java代码中通过btn1关联次控件 android:id="@+id/btn1" 控件宽度 android:layout_width="80px"    //"80dip"或"80dp" android:layout_width =“wrap_content” android:layout_width =“match_parent” 控件高度 android

RelativeLayout的属性设置

设有两个控件one和two,以控件one为基准.由于代码比较简单就不贴了,直接上效果图. 一.第一组:将控件two放在控件one的上.下.左.右.开始.结束. android:layout_below="" 上         android:layout_above="" 下         android:layout_toLeftOf="" 左         android:layout_toRightOf="" 右 

android基础知识复习——RelativeLayout布局属性、背景、半透明设置(XML设置)

转自:http://blog.csdn.net/fansongy/article/details/6817968 复习布局与XML,写了一个空的登录界面.XML的注释我写在当行的后面了.程序运行图: 主函数没有改动,不贴了.背景图片名为:background.jpg .看看main.xml吧. [html] view plaincopyprint? <?xml version="1.0" encoding="utf-8"?> <LinearLayo

Android中RelativeLayout各个属性 android:layout_alignParentLeft=”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控件的右边缘对齐 andr

relativelayout常用属性

===================================================================================== 整理于http://naotu.baidu.com/file/e5880b84b1a906838116f7a45f58de78

熟悉AndroidAPI系列6——RelativeLayout常见属性1

layout_below,layout_above,layout_toRightOf,layout_toLeftOf layout_alignRight,layout_alignLeft,layout_alignTop,layout_alignBotton 什么是baseLine?