<ListView
android:id="@+id/myList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:listSelector="@android:color/transparent"
android:cacheColorHint="#00000000"
android:fadingEdge="none"
>
android:id="@+id/myList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:listSelector="@android:color/transparent"
android:cacheColorHint="#00000000"
android:fadingEdge="none"
>
</ListView>
属性: android:listSelector="@android:color/transparent"
等同于使用:android:listSelector=”#00000000″ //这样写也是透明的
用来去除选中item时的高亮效果(默认橙黄色)
属性: android:cacheColorHint="#00000000"
用来去除当用户滚动ListView的时会item出现黑色阴影
属性:android:fadingEdge="none"
用来去除当用户滚动ListView在其上下边缘会有白色的阴影
其它的以后再续....
本文介绍如何通过设置ListView的属性来改善其在Android应用中的显示效果,包括移除选中项的高亮、消除滚动时的阴影及边缘效果。
3159

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



