在我的 ListActivity 上,当我在 Android 2.2 虚拟设备上运行时,我得到了边缘渐变效果。但是,当我使用带有 Android 2.2.1 的三星 GIO 来运行完全相同的应用程序时,我没有得到 ListView 边缘褪色。可能是什么原因?下面是 ListActivity 中我的 ListView 的 XML:
<ListView
android:id="@+id/@android:list"
android:fadingEdge="vertical"
android:fadingEdgeLength="3mm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/showMixHeader"/>
最佳答案
如果我以编程方式为 ListView 启用淡入淡出,我会在三星 Galaxy Tab 上看到淡入淡出:
listView.setVerticalFadingEdgeEnabled(true); // Make sure that fading is displayed on samsung devices
也许三星在那里的 Android 版本上默认禁用了它。
(在固件版本 2.2、三星 Galaxy Tab 7 上测试)