Scrolling a ListView changes everything from White to Black

This question already has an answer here:

  • Background ListView becomes black when scrolling 11 answers

  • The solution is very simple, you also need to set the cache color hint to white: setCacheColorHint(Color.WHITE) . You don't need to change the list items' background color.


    ListView lv = getListView();
    setCacheColorHint(0);
    

    将缓存颜色提示设置为零。


    解决方案非常简单,您还需要在xml中将缓存颜色提示设置为黑色。

    android:cacheColorHint="#000000"
    
    链接地址: http://www.djcxy.com/p/30550.html

    上一篇: ListView项目在触摸时不会显示焦点

    下一篇: 滚动ListView可以改变从白色到黑色的所有内容