I tried to use the PreoptimizedCLV with the CLVIndexScroller class.
With customlistview works fine, but when I add the PreoptimizedCLV don't works.
Is possible to use this components together?
My code and example project - using the original PreoptimizedCLV example - is in attach.
Thanks in advance for any help.
B4X:
PCLV.Initialize(Me, "PCLV", CustomListView1)
Dim words As List = File.ReadList(File.DirAssets, "english.txt")
For Each word As String In words
PCLV.AddItem(60dip, xui.Color_White, word)
Next
PCLV.ShowScrollBar = False
PCLV.Commit
clvIS.Initialize(CustomListView1,False,True,True)
PreoptimizedCLV does include something like that built-in.
Unless you have many thousands or more of items then I don't recommend you using PreoptimizedCLV. Use lazy loading instead. It will be simpler and work fast enough (test in release mode).
I removed the CLVIndexScroller class module and added a fast scrolling seekbar. See if this suits you. I think there is a way to add an alphabetic listing when scrolling too, but I did not have a chance to explore it in this project. But if you succeed in doing something you mentioned in your post #3, share it
I removed the CLVIndexScroller class module and added a fast scrolling seekbar. See if this suits you. I think there is a way to add an alphabetic listing when scrolling too, but I did not have a chance to explore it in this project. But if you succeed in doing something you mentioned in your post #3, share it
With a regular CLV, an empty panel is created for each item. It has many advantages and works good enough for lists of up to several thousands items.
PreoptimizedCLV doesn't create any item except of the ones visible so it can be used for huge lists.
The truth is that users never want to scroll a list with more than a few hundreds items. So if you are trying to solve performance issues of huge lists then you probably have a UX issue.
Lazy loading is a concept so it depends on the context. When I say CLV + lazy loading, I do not mean to use Preoptimized CLV. I mean that the developer should handle the visible changed event and create the layouts just before they are displayed (and also remove layouts that are no longer needed).
PCLV goes another step forward and changes the way CLV works.