Android中如何取消listview的點(diǎn)擊效果
在xml文件里面有l(wèi)istselecter的屬性引用
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:listSelector="@android:color/transparent">
</ListView>
引用transparent之后會讓點(diǎn)擊效果透明化,昨天整了半天才搞出來,記錄一下。
PS:去除或替換listview 默認(rèn)的點(diǎn)擊選中時的顏色
1.去除默認(rèn)的點(diǎn)擊選中時的顏色
(1)設(shè)置列表layout的backgroudcolor屬性就OK了。
(2)
Android:focusable="false" android:focusableInTouchMode="false" android:cacheColorHint="#00000000" android:listSelector="#00000000"
2.替換listview 默認(rèn)的點(diǎn)擊選中時的顏色
設(shè)置listivew的listSelector屬性就可以了。
相關(guān)文章
Android 中menu同時顯示圖標(biāo)和文字的實(shí)現(xiàn)
這篇文章主要介紹了Android 中menu同時顯示圖標(biāo)和文字的實(shí)現(xiàn)的相關(guān)資料,希望通過本文能幫助到大家實(shí)現(xiàn)這樣的功能,需要的朋友可以參考下2017-10-10
Android實(shí)現(xiàn)Activities之間進(jìn)行數(shù)據(jù)傳遞的方法
這篇文章主要介紹了Android實(shí)現(xiàn)Activities之間進(jìn)行數(shù)據(jù)傳遞的方法,涉及Android中Activities的使用技巧,需要的朋友可以參考下2015-04-04
Android調(diào)用前后攝像頭同時工作實(shí)例代碼
本篇文章主要介紹了Android調(diào)用前后攝像頭同時工作實(shí)例代碼,這里整理了詳細(xì)的代碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下。2017-07-07
Android?ASM插樁探索實(shí)戰(zhàn)詳情
這篇文章主要介紹了Android?ASM插樁探索實(shí)戰(zhàn)詳情,文章圍繞主題展開詳細(xì)的內(nèi)容戒殺,具有一定的參考價值,需要的小伙伴可以參考一下2022-09-09

