亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Android中如何取消listview的點擊效果

Original 2017-01-13 09:50:50 363
abstract:這篇文章主要介紹了 Android中取消listview的點擊效果的實現(xiàn)方法,通過引用transparent之后會讓點擊效果透明化,一起通過本文學(xué)習(xí)吧在xml文件里面有l(wèi)istSELECTer的屬性引用<ListView     android:layout_width="match_parent"   &nbs

這篇文章主要介紹了 Android中取消listview的點擊效果的實現(xiàn)方法,通過引用transparent之后會讓點擊效果透明化,一起通過本文學(xué)習(xí)吧

在xml文件里面有l(wèi)istSELECTer的屬性引用

<ListView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
android:listSelector="@android:color/transparent">
</ListView>

引用transparent之后會讓點擊效果透明化,昨天整了半天才搞出來,記錄一下。

PS:去除或替換listview 默認的點擊選中時的顏色

1.去除默認的點擊選中時的顏色

(1)設(shè)置列表layout的backgroudcolor屬性就OK了。

(2)

Android:focusable="false" android:focusableInTouchMode="false"
  android:cacheColorHint="#00000000" android:listSelector="#00000000"

2.替換listview 默認的點擊選中時的顏色

設(shè)置listivew的listSelector屬性就可以了。

更多關(guān)于Android中如何取消listview的點擊效果請關(guān)注PHP中文網(wǎng)(ipnx.cn)其他文章!

Release Notes

Popular Entries