1

我有一个相对布局,里面有两个线性的。第一个有一个图像作为背景,第二个有 4 个按钮,一个在另一个下方。

<RelativeLayout  android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:orientation="vertical" >

<LinearLayout   android:id="@+id/img"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/bg1">
</LinearLayout>

<LinearLayout  android:id="@+id/header_layout_select"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:layout_below="@id/img
 android:layout_alignParentBottom="true"      android:orientation="vertical" >

<button .... >
<button .... >
<button .... >
<button .... >

</LinearLayout>

</RelativeLayout>

我希望 btn 布局低于 img 布局。我的问题是,如果我在一个非常小的屏幕(例如 2.7 英寸)上运行我的应用程序,我只能看到前 2 个按钮。我想看看所有的按钮。

4

1 回答 1

1

您可以添加一个 VerticalScrollView
Like (伪代码)

<RelativeLayout>
<ScrollView >
<Relativelayout>
<linearLayout>
</linear>
<linear>
<button> </button>
<button> </button>
<button> </button>
<button> </button>
</linear>
</relative>
</ScrollView>
</RelativeLayout>

如果屏幕小,可以向下滚动

于 2013-06-30T12:55:51.397 回答