Android Question clv lazy-loading external function

KZero

Active Member
Licensed User
Longtime User
Hi,

i'm creating chat view using xCustomListView , and i made lazy-loading and everything is working ok

but now i have 2 functions
- CreateListItem(.....) as panel to add new message to list in the runtime
- and the exact same code in CLV_VisibleRangeChanged to recreate the item when it become visible

i can't use the function "CreateListItem" in CLV_VisibleRangeChanged because i can't pass the panel "ByRef" and i have to deal with "Dim p As Panel = CLV.GetPanel(i)"

is it possible to use my current CreateListItem function inside CLV_VisibleRangeChanged to load items into the panel or what is the best practice in my case ?

note : i tried to load the new item to the database then call "CLV.JumpToItem(CLV.Size-1)" to trigger VisibleRangeChange , it worked but its not smooth.

Thanks
 
Top