| 一.线性布局 
 android:orientation=“horizontal”  
 
  
 android:orientation=“vertical”  
 android:layout_weight=“x” <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:orientation="horizontal"
    android:layout_height="match_parent">
    <Button
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="按钮1"
        android:layout_weight="1"
        android:textSize="20sp"
        />
    <Button
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="按钮2"
        android:layout_weight="1"
        android:textSize="20sp"
        />
    <Button
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="按钮3"
        android:layout_weight="2"
        android:textSize="20sp"
        />
</LinearLayout>
 将空间分为 4分 最后一个占2分
  相对布局默认从左上角排列,加上parent,相对于父亲***** <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:paddingBottom="20dp"
    android:layout_height="match_parent">
    <Button
    android:id="@+id/btn_one"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="20sp"
    android:text="按钮1"
    android:layout_alignParentBottom="true"
    />
    <Button
        android:id="@+id/btn_two"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="20sp"
        android:text="按钮2"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="260dp"
        />
    <Button
        android:id="@+id/btn_three"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="20sp"
        android:text="按钮3"
        android:layout_toLeftOf="@+id/btn_two"
        android:layout_alignBottom="@+id/btn_two"
        android:layout_marginBottom="100dp"
        />
</RelativeLayout>
 帧布局最简单的布局默认显示在左上角,会进行重叠摆放
  
 android:foreground=""设置帧布局容器的前景图像(始终在所有子控件之上)
 android:foregroundGravity=""
 设置前景图像的显示位置
 表格布局 
 android:stretchColumns=“3”表示第三列可以被拉伸
 <?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:stretchColumns="3"
    >
    <TableRow
        android:layout_height="match_parent"
        android:layout_width="wrap_content">
        <Button
           android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_column="0"
            android:text="1"
            />
        <Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_column="1"
            android:text="2"
            />
    </TableRow>
    <TableRow
        android:layout_height="match_parent"
        android:layout_width="wrap_content">
        <Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_column="0"
            android:text="1"
            />
        <Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_column="1"
            android:text="2"
            />
        <Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_column="3"
            android:text="3"
            />
    </TableRow>
    <TableRow
        android:layout_height="match_parent"
        android:layout_width="wrap_content">
        <Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_column="3"
            android:text="3"
            />
    </TableRow>
</TableLayout>
 绝对布局(了解)  
 这里是引用 |