【发布时间】:2011-11-01 19:00:23
【问题描述】:
我有这个 xml 文件。该列表包含 2 个项目。当我在 SDK 模拟器或平板电脑上测试应用程序时,它显示为有意的。但是,当我在装有 Android v2.2.1 的三星 GT-S5570 上下载该应用程序时,用户可以从顶部拖动列表并将其移至屏幕底部。有什么办法可以防止这种情况发生吗?
<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>
【问题讨论】:
-
这可能是操作系统的默认行为。
-
这就是我的怀疑,我认为唯一的解决方案是使用 Paresh 链接建议的 ScrollView。