ListView item won't stay “selected”

后端 未结 10 1297
暗喜
暗喜 2020-12-10 05:50

I want to change the background of a listview item when the user clicks it. Kind of like the Honeycomb settings page (Although I\'m not dealing with just settings so I\'m no

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-10 06:25

    Ok, so I tried the solution above from where it says "This is implementation of sgarman idea:" This only works if SetFocusListener is an OnTouchListner. Ohterwise the onClick method consumes the click. I had to pair this solution with an OnItemClick listener on my list item to get the list to actually show the highlighted item.

提交回复
热议问题