<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/buttonLayout"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1">
<Button
android:id="@+id/vehicleButton"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1"
android:text="Refresh"
android:onClick="getVehicles" />
<Button
android:id="@+id/logoutButton"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1"
android:text="Logout"
android:onClick="logout" />
</LinearLayout>
<ListView
android:id="@+id/android:list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
大家好,當上述的ListView填充了只有幾個項目,我仍然可以看到的按鈕,然而,當ListView控件中填充超過屏幕可以顯示,這些按鈕似乎在用戶界面上方「推」,並且不再可見,只有可滾動的ListView現在可見。的LinearLayout是「推」時的ListView填充
對於如何讓按鈕再次出現在更長的列表上有什麼想法嗎?
謝謝
是你的完整佈局文件嗎?在佈局文件中你發佈的ListView不應該是按下按鈕吧 – Luksprog
把你的按鈕作爲標題到你的列表 – njzk2
這是完整的佈局文件是,th列表視圖由另一個XML文件的實例填充 – Seb