效果图:
xml文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/hello"
android:layout_alignParentTop="true" />
<LinearLayout
android:id="@+id/bottom_layout"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/select_all"
android:text="@string/select_all"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/select_other"
android:text="@string/select_other"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/select_cancel"
android:text="@string/select_cancel"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<ListView
android:id="@+id/list"
android:layout_below="@id/show"
android:layout_above="@id/bottom_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>