zoukankan      html  css  js  c++  java
  • Android RelativeLayout 属性

    // 相对于给定ID控件

    android:layout_above 将该控件的底部置于给定ID的控件之上;

    android:layout_below 将该控件的底部置于给定ID的控件之下;

    android:layout_toLeftOf    将该控件的右边缘与给定ID的控件左边缘对齐;

    android:layout_toRightOf  将该控件的左边缘与给定ID的控件右边缘对齐;

    android:layout_alignBaseline  将该控件的baseline与给定ID的baseline对齐;

    android:layout_alignTop        将该控件的顶部边缘与给定ID的顶部边缘对齐;

    android:layout_alignBottom   将该控件的底部边缘与给定ID的底部边缘对齐;

    android:layout_alignLeft        将该控件的左边缘与给定ID的左边缘对齐;

    android:layout_alignRight      将该控件的右边缘与给定ID的右边缘对齐;

    // 相对于父组件

    android:layout_alignParentTop      如果为true,将该控件的顶部与其父控件的顶部对齐;

    android:layout_alignParentBottom 如果为true,将该控件的底部与其父控件的底部对齐;

    android:layout_alignParentLeft      如果为true,将该控件的左部与其父控件的左部对齐;

    android:layout_alignParentRight    如果为true,将该控件的右部与其父控件的右部对齐;

    // 居中

    android:layout_centerHorizontal 如果为true,将该控件的置于水平居中;

    android:layout_centerVertical     如果为true,将该控件的置于垂直居中;

    android:layout_centerInParent   如果为true,将该控件的置于父控件的中央;

    // 指定移动像素

    android:layout_marginTop      上偏移的值;

    android:layout_marginBottom 下偏移的值;

    android:layout_marginLeft   左偏移的值;

    android:layout_marginRight   右偏移的值;

    example:

    android:layout_below = "@id/***"

    android:layout_alignBaseline = "@id/***"

    android:layout_alignParentTop = true

    android:layout_marginLeft = “10px”

  • 相关阅读:
    P2121 拆地毯
    ※P1194 买礼物
    P1991 无线通讯网
    P2872 [USACO07DEC]Building Roads S
    python+pycharm+selenium+谷歌浏览器驱动 自动化环境部署(一)
    from bs4 import BeautifulSoup 引入需要安装的文件和步骤
    小菜鸟的python3.8.5+RobotFramework+RIDE的安装之路
    IntelliJ IDEA 之 工具箱(Tool Box)
    RobotFrameWork Web自动化测试环境搭建
    Python pip 安装与使用
  • 原文地址:https://www.cnblogs.com/sevenyuan/p/1827940.html
Copyright © 2011-2022 走看看