我想在top和bottom按钮之间添加一个listView。我不希望它有一个固定的大小,所以我试图把它像这样:在两个元素之间添加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的上方。 - > listview与button2重叠。
我该如何放置这两个按钮之间的列表视图?
这样的事情? http://blog.maxaller.name/2010/05/attaching-a-sticky-headerfooter-to-an-android-listview/ – sherpya