我有這個xml文件。該列表包含2個項目。當我在SDK模擬器或平板電腦上測試應用程序時,它顯示爲默認。但是,當我使用Android v2.2.1在Samsung GT-S5570上下載應用程序時,用戶可以從頂部拖動列表並將其移至屏幕的底部。有什麼辦法可以防止這種情況發生?android listview不會貼在佈局頂部
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="20dip"
android:id="@android:id/list"
android:cacheColorHint="@android:color/transparent"
android:textAppearance="?android:attr/textAppearance"/>
</RelativeLayout>
這可能是操作系統的默認行爲。 –
這就是我所懷疑的,我認爲唯一的解決方法是使用ScrollView作爲Paresh的鏈接建議。 – iCantSeeSharp