Android Question xCustomListView

Johan Schoeman

Expert
Licensed User
Longtime User
Please advise

How many items can at maximum be added to a xCustomListView before it will generate the following error:

xCustomListView Error:
java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (List).

If I add less items then it seems to run without a problem. Not using lazy loading. Just a hard xCustomListView. 50 seems to be OK. Somewhere between 50 and 300 it causes the above error. Have not fiddled around to see what is the max I can push it to. Maybe someone has done this before and established the max....?

Rgds

JS
 

Johan Schoeman

Expert
Licensed User
Longtime User
That depends on your phone, as well as the size and complexity of your items.
That is also what I have sort of seen. Not too much of an issue as I can split it into more than one app and each handling the appropriate section.
 
Last edited:
Upvote 0

b4x-de

Active Member
Licensed User
Longtime User
Are you trying to access a view within a ListItem's panel? Let's say your item panel, pnlCustomer, has a label called lblFirstName. In that case, you cannot always safely access it through the member variable you declared in Class_Globals - even if looks correct "Private lblFirstName As Label."

This member variable may not (yet) point to the corresponding view in the ListItem's panel. It is better to access it via pnlCustomer.GetView(x) to ensure you are actually addressing the correct label.
 
Upvote 0
Top