Android Question PreoptimizedCLV clarifications

LucaMs

Expert
Licensed User
Once the items are committed you can add or remove items by modifying CLV directly and calling PCLV.
B4X:
CustomListView1.InsertAtTextItem(Index, "New Item", "")
PCLV.ListChangedExternally
PCLV ignores these items.
What "PCLV ignores these items." means?


ScrollView height in Android is limited to 16,777,215 pixels. The exact limit depends on the device scale and the items height.
Given this "warning", does this mean that no items are ever deleted? I mean I suppose there is no loading limit...
I almost certainly don't have completely clear ideas about this class.
I seem to remember that "lazy loading xCLV" prepared N item (Panels) and reused these; for example, the xCLV could show 10 items and N graphic items (previous M, subsequent M) were ready in memory, that this was the optimization, not having all the graphic items (panels) already loaded in memory. But if it is written that "ScrollView height in Android is limited to 16,777,215 pixels" it seems that all the items (panels) are kept in memory, or not?

Ultimately, what I'm trying to understand is how to manage database records with a "lazy loading" xCLV or, better, with this new "Preoptimized".
Perhaps I have to use db queries with the LIMIT clause and use the "classic" xCLV (?).
 

Erel

B4X founder
Staff member
Licensed User
What "PCLV ignores these items." means?

Given this "warning", does this mean that no items are ever deleted? I mean I suppose there is no loading limit...
it seems that all the items (panels) are kept in memory, or not?
No. This limitation is really not worth discussing. The ScrollView itself has a length limit.
 
Upvote 0

LucaMs

Expert
Licensed User
The ScrollView itself has a length limit.
Yes, I know and this is also what you wrote (ScrollView height in Android is limited to 16,777,215 pixels).
I meant a differenti thing, but it doesn't matter, I'll solve.
 
Upvote 0
Top