Please, suggest a ListView class or lib (but not the mListView lib that is buggy), where selection is highlighted (or any way to show that tapped), SingleLine and TwoLine also.
Without extra features, just selection - CustomLIstView is too difficult, and it needs to have possibility to store many items, more than 3000.
Please, suggest a ListView class or lib (but not the mListView lib that is buggy), where selection is highlighted (or any way to show that tapped), SingleLine and TwoLine also.
Without extra features, just selection - CustomLIstView is too difficult, and it needs to have possibility to store many items, more than 3000.
The solution to most problems with listviews, including yours, is my UltimateListView but if you find CustomListView too difficult, then you should avoid my library. Since the two libs are very different, it is difficult to say whether one is easier to use than the other, but from my point of view CustomListView is not complicated at all; that's why I prefer to warn you.
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:
B4X:
Dim CDPressed,CDNormal As ColorDrawable
CDPressed.Initialize(Colors.Gray,0) ' Normal color
CDNormal.Initialize(Colors.Yellow,0) 'Selected color
Dim SLD As StateListDrawable
SLD.Initialize
SLD.AddState(SLD.State_Pressed,CDPressed)
SLD.AddState(-SLD.State_Pressed,CDNormal)
Dim LVO As JavaObject = ListView1
LVO.RunMethod("setSelector",Array As Object(SLD))
ListView1.FastScrollEnabled=True
Requires the new JavaObject Library
I will post this in a new thread as well so anyone that needs it can find it.