【发布时间】:2014-03-24 16:00:41
【问题描述】:
我想在顶部和底部按钮之间添加一个 listView。我不希望它有固定的大小,所以我尝试这样设置:
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/button1" />
<Button
android:id="@+id/button2
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
但是以这种方式设置布局文件时,列表视图当然在第一个按钮下方,但从那里向下到屏幕的按钮,而不是在按钮 2 上方停止。 --> 列表视图与按钮2重叠。
如何在这两个按钮之间放置列表视图?
【问题讨论】:
标签: android xml listview android-listview