美文网首页
布局之 相对控件布局

布局之 相对控件布局

作者: 事件_666 | 来源:发表于2017-09-08 00:11 被阅读0次

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:id="@+id/Button_center"
android:text="CenterButton"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/Button_center"
android:layout_toLeftOf="@+id/Button_center"
android:text="above left"/>

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/Button_center"
    android:layout_toRightOf="@+id/Button_center"
    android:text="above ToRightOf"
    />
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/Button_center"
    android:layout_toLeftOf="@+id/Button_center"
    android:text="below toLeftOf"/>
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/Button_center"
    android:layout_toRightOf="@+id/Button_center"
    android:text="below toRightOf"/>

相关文章

  • 布局之 相对控件布局

  • UI

    1、布局线性布局 相对布局 框架布局 表格布局 2、控件 设置控件的可见性,使用的是setVisibility()...

  • 第四周笔记

    用户开发中的布局开发 布局和控件(完成UI设计) 涉及布局layout和控件View 线性布局和相对布局 显示文本...

  • Android:控件布局(相对布局)RelativeLayout

    RelativeLayout是相对布局控件:以控件之间相对位置或相对父容器位置进行排列。 相对布局常用属性: 子类...

  • Android学习笔记(一)

    ★布局。 相对布局: *停靠父控件边界(boolean) layout_alignParentTop(停靠父控件上...

  • 控件布局方法

    方法1:相对父布局定位方法2:相对某个控件进行定位(依据id属性) 相对父布局定位: 效果: 相对某个控件进行定位...

  • 08-13复习

    广播 网络 意图 Activity View 布局 约束 线性 帧布局 相对布局 控件 textview edit...

  • Android常用ViewGroup之RelativeLayou

    简介 相对布局可以让子控件相对于兄弟控件或父控件进行布局,可以设置子控件相对于兄弟控件或父控件进行上下左右对齐。R...

  • 相对布局(RelativeLayout)

    前言 相对布局可以让子控件相对于兄弟控件或父控件进行布局,可以设置子控件相对于兄弟控件或父控件进行上下左右对齐。R...

  • 2.2.2相对布局

    1 相对布局的概念 相对布局是通过相对定位的方式制定控件位置,即以其他控件或父容器为参照物摆放控件位置,在设计相对...

网友评论

      本文标题:布局之 相对控件布局

      本文链接:https://www.haomeiwen.com/subject/yxgwjxtx.html