只需要为ListView添加cacheColorHint属性,并设置其值为#00000000,例如
<ListView
android:id="@+id/contentList"
android:layout_below="@id/rel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:layout_alignParentBottom="true"
android:cacheColorHint="#00000000"
/>
本文介绍了一种清除Android中ListView缓存颜色的方法,通过设置ListView的cacheColorHint属性值为#00000000,可以有效地解决ListView滚动时背景残留的问题。
866

被折叠的 条评论
为什么被折叠?



