android:layout_width="match_parent"
android:layout_height="match_parent" >
android:id="@+id/center"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="中间"
android:layout_centerInParent="true"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="上面"
android:layout_above="@id/center"
android:layout_alignLeft="@id/center"
android:layout_alignRight="@id/center"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下面"
android:layout_below="@id/center"
android:layout_alignLeft="@id/center"
android:layout_alignRight="@id/center"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="左边"
android:layout_toLeftOf="@id/center"
android:layout_alignTop="@id/center"
android:layout_alignBottom="@id/center"
android:layout_alignParentLeft="true"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="右边"
android:layout_toRightOf="@id/center"
android:layout_alignTop="@id/center"
android:layout_alignBottom="@id/center"
android:layout_alignParentRight="true"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="左上"
android:layout_toLeftOf="@id/center"
android:layout_above="@id/center"
android:layout_alignParentLeft="true"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="左下"
android:layout_toLeftOf="@id/center"
android:layout_below="@id/center"
android:layout_alignParentLeft="true"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="右上"
android:layout_toRightOf="@id/center"
android:layout_above="@id/center"
android:layout_alignParentRight="true"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="右下"
android:layout_toRightOf="@id/center"
android:layout_below="@id/center"
android:layout_alignParentRight="true"
/>