我有这个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