I found some code on the internet that works with a standard ListView, an example is attached. I use ListView's all the time with large lists >3000 items and I will find this one useful.
It uses StateListDrawable. Code is:
Code:
Dim CDPressed,CDNormal AsColorDrawable
CDPressed.Initialize(Colors.Gray,0) ' Normal color CDNormal.Initialize(Colors.Yellow,0) 'Selected color Dim SLD AsStateListDrawable
SLD.Initialize
SLD.AddState(SLD.State_Pressed,CDPressed)
SLD.AddState(-SLD.State_Pressed,CDNormal)
Dim LVO As JavaObject = ListView1
LVO.RunMethod("setSelector",ArrayAsObject(SLD))
ListView1.FastScrollEnabled=True
Requires the new JavaObject Library
It uses StateListDrawable. Code is:
Code:
Dim CDPressed,CDNormal AsColorDrawable
CDPressed.Initialize(Colors.Gray,0) ' Normal color CDNormal.Initialize(Colors.Yellow,0) 'Selected color Dim SLD AsStateListDrawable
SLD.Initialize
SLD.AddState(SLD.State_Pressed,CDPressed)
SLD.AddState(-SLD.State_Pressed,CDNormal)
Dim LVO As JavaObject = ListView1
LVO.RunMethod("setSelector",ArrayAsObject(SLD))
ListView1.FastScrollEnabled=True
Requires the new JavaObject Library