修改layout中xml为
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
>
<Button
android:text="按钮 1"
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<Button
android:text="按钮 2"
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<Button
android:text="按钮 3"
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<Button
android:text="按钮 4"
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>