Android: disable ListView selection

后端 未结 4 1505
北恋
北恋 2020-12-15 05:32

I have a listView that I re-display with the correct answer highlighted when the user selects an item. However, at that point I would like to disable selection of list view

4条回答
  •  时光取名叫无心
    2020-12-15 06:09

    You can add attribute to Listview XML layout to disable multiple high light rows as

    android:listSelector="@android:color/transparent"               
    android:cacheColorHint="@android:color/transparent"
    

提交回复
热议问题