4

Normally in the Gridview, while you are pressing on an element in the grid, it highlights the specific squares background with a nice orange'ish well defined. I want to make it stay highlighted after you let go as well, basically turn it into a toggle on/off for the highlights. I want to use the android highlight color that's built in automatically but I have so far been unsuccessful in any attempt to get this to work. Any help would be greatly appreciated.

Thanks!

user522696
  • 41
  • 1
  • 2

2 Answers2

5

Use android:listSelector="#00000000" in your GridView element in your XML layout file.

Andro Selva
  • 53,910
  • 52
  • 193
  • 240
peter_feng
  • 855
  • 2
  • 7
  • 11
3

Try setting

setDrawSelectorOnTop(true)

This draws selector over the selected item.

Raunak
  • 6,427
  • 9
  • 40
  • 52