我有一個列表視圖,editText和按鈕。編輯文本和按鈕是我的頁腳到列表視圖。想要的是將頁腳定位在屏幕的底部,並且可以在頁腳上方滾動列表視圖。我的佈局是這樣的:如何在android中添加頁腳視圖到列表視圖?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@android:id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:>
</ListView>
<EditText
android:id="@+id/txtType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/add" />
<Button
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:onClick="onClick"
android:text="Add" />
</RelativeLayout>
我上面的圖片實現,但我的問題是,我下面的頁腳中的列表視圖滾動。頁腳就像漂浮在列表視圖上一樣。我希望listview只能在這個頁腳上方滾動。幫我
你想讓頁腳滾動嗎? – Shubhayu 2012-04-03 10:10:02
看到這篇文章[Android ListView頁腳視圖不被放置在屏幕底部](http://stackoverflow.com/questions/3093481/android-listview-footer-view-not-being-placed-on-the漢字的最屏) – 2012-04-03 10:11:23