Listview.set Cachecolorhint (0) or android:cachecolorhint= "#000000" to remove the drag background color of the ListView
When customizing the ListView, when you do not use the android:cachecolorhint= "#00000000" will appear below to select a space for the black background of the case, damage the overall aesthetics:
When you do not use the Android:listselector property, the selected item is displayed by default as an orange background, and sometimes we need to remove the effect:
ListView Drag background image hidden 2013-07-19
123456789101112131415161718192021222324252627282930 |
<!-- 最后一条item所在的位置会闪烁 --> <ListView android:id="@+id/recommand_app_list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/recommands_list_view_header_divider" android:fadingEdge="none" android:scrollbars="none" android:scrollingCache="true"> </ListView> <!--修复问题: 最后一条item所在的位置会闪烁 --> <ListView android:id="@+id/recommand_app_list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/recommands_list_view_header_divider" android:background="@drawable/ic_content_bg_repeat" android:divider="@drawable/ic_list_divider_repeat" android:dividerHeight="1dp" android:fadingEdge="none" android:persistentDrawingCache="none" android:scrollbars="none" android:scrollingCache="false" android:smoothScrollbar="true"> </ListView> |
The ListView is a frequently used Android control that summarizes some of the little landscaping details that have been encountered.
1, the ListView in the drag when the background image disappears into a black background, wait until the drag is complete our own background picture only then displays
Workaround: Add in XML
Android:scrollingcache= "false" or "android:cachecolorhint=" #00000000 ″
2, the top and bottom of the ListView has a black shadow
FIX: android:fadingedge= "None"
3. Modify the yellow background when the ListView item is selected by default
Workaround: Use the Listview.setselector () method in a Java file, or use the following code
1android:listselector= "#00000000"//This write is transparent, you can also add drawable pictures
4, Lsitview between each item need to set a picture as the interval
Solution: android:divider= "@drawable/list_driver"
http://blog.csdn.net/liuhanhan512/article/details/7225989
Android Learning--android:cachecolorhint= "#00000000"