在xml文件里面有listselecter的屬性引用
<ListView android:layout_width="match_parent" android:layout_height="wrap_content"android:listSelector="@android:color/transparent"></ListView>
引用transparent之后會讓點擊效果透明化,昨天整了半天才搞出來,記錄一下。
PS:去除或替換listview 默認的點擊選中時的顏色
1.去除默認的點擊選中時的顏色
(1)設置列表layout的backgroudcolor屬性就OK了。
(2)
Android:focusable="false" android:focusableInTouchMode="false" android:cacheColorHint="#00000000" android:listSelector="#00000000"
2.替換listview 默認的點擊選中時的顏色
設置listivew的listSelector屬性就可以了。
新聞熱點
疑難解答