android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="240dp"
android:layout_height="240dp"
android:background="#ff0000"
android:layout_gravity="center"
/>
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#00ff00"
android:layout_gravity="center"
/>
android:layout_width="160dp"
android:layout_height="160dp"
android:background="#0000ff"
android:layout_gravity="center"
/>
android:layout_width="120dp"
android:layout_height="120dp"
android:background="#ffff00"
android:layout_gravity="center"
/>
android:layout_width="80dp"
android:layout_height="80dp"
android:background="#8000EE"
android:layout_gravity="center"
/>
android:layout_width="40dp"
android:layout_height="40dp"
android:background="#ffffff"
android:layout_gravity="center"
/>
效果图
特点
默认初始的位置在左上角
后写的控件在前面控件的上方