zoukankan      html  css  js  c++  java
  • 相对布局之相对布局常用的两组属性

    相对布局是通过指定当前控件与兄弟控件或者是父控件之间的相对位置,从而达到控制控件位置的目的

    先看第一组属性                              

    android:layout_toLeftOf               

    android:layout_toRightOf    将当前控件的左边缘对其id所指定控件的右边缘对齐

    android:layout_below

    android:layout_above

    <TextView
            android:id="@+id/textViewId"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#FF0000"
            android:text="第一个textview" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#00FF00"
            android:layout_toRightOf="@id/textViewId"
            android:text="第二个textview" />

    其它的都类似。

    第二组属性

    android:layout_alignLeft            将当前控件的左边缘与其id所指定的控件的右边缘对其(与上类似)

    android:layout_alignRight

    android:layout_alignTop

    android:layout_alignBottom

    (这两者在我看来可以相互换用没有发现区别,具体看Mars老师的视频13集,欢迎交流)

  • 相关阅读:
    chattr
    chage命令
    passwd命令
    usermod命令
    userdel命令
    useradd命令
    信息热词分析系统重构
    pandas数据清洗
    python 中mysql数据库的读写
    java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
  • 原文地址:https://www.cnblogs.com/mercuryli/p/4410369.html
Copyright © 2011-2022 走看看