Listview 选项按下去黑了所有按钮的解决方法 ——android:cacheColorHint=“#00000000”

 

在java代码下,加一条, listView.setCacheColorHint(0);

 

或者在 布局.xml, listview 中 加上   android:cacheColorHint="#00000000" 去除listview的拖动背景色

自定义listview的时候,当你不使用android:cacheColorHint=“#00000000”会出现下面选中一个空间黑色底色的情况,破坏整体美观度:

 

当你不使用android:listSelector属性,默认会显示选中的item为橙黄底色,有时候我们需要去掉这种效果:

原文地址:https://www.cnblogs.com/firecode/p/2604653.html