五大布局
FrameLayout(框架布局),LinearLayout (线性布局),AbsoluteLayout(绝对布局),RelativeLayout(相对布局),TableLayout(表格布局)。
1、FrameLayout
所有东西依次都放在左上角,会重叠,这个布局比较简单,也只能放一点比较简单的东西。
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0b0">
<TextView
android:layout_width="300dp"
android:layout_height="300dp"
android:background="#021"
android:layout_gravity="center" />
<TextView
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#d31"
android:layout_gravity="center" />
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#02f"
andro