Hi,
I already setup a CLV with CLVSwipe feature on my app, every thing work great as expected. I use lazy-loading to show item data which contains several view and image on the item panel.
Problem occur (laggy) with bigger data, in the item panel i have to do some httpjob to get image from my server.
I read carefully PreoptimizeCLV and make some adjustment to my code, all done and the result much better, i mean (very) fast when scroll. No lagging issue as before with or without enabling fast-scrolling.
Mean while, i have some wishes:
1. Please change Size parameter to Height, because on the first time i was confuse size for what ?
2. Some time i have to change panel height base on its content, since the PCLV height was define before adding any item to the CLV so i wish there is a way how to manually resize PCLV height.
3.I lost CLVSwipe feature by using PreoptimizeCLV, i already try to modified the code with no success and no idea where should i put swipe.CreateItemValue method. So i wish if there a sample of combining PreoptimizeCLV and CLVSwipe at the same time will be appreciate.
Edit: After several time trial and error, finaly i found solution for this issue;
Add swipe.CreateItemValue method when adding item to PCLV
Thank you
I already setup a CLV with CLVSwipe feature on my app, every thing work great as expected. I use lazy-loading to show item data which contains several view and image on the item panel.
Problem occur (laggy) with bigger data, in the item panel i have to do some httpjob to get image from my server.
I read carefully PreoptimizeCLV and make some adjustment to my code, all done and the result much better, i mean (very) fast when scroll. No lagging issue as before with or without enabling fast-scrolling.
Mean while, i have some wishes:
1. Please change Size parameter to Height, because on the first time i was confuse size for what ?
2. Some time i have to change panel height base on its content, since the PCLV height was define before adding any item to the CLV so i wish there is a way how to manually resize PCLV height.
3.
Edit: After several time trial and error, finaly i found solution for this issue;
Add swipe.CreateItemValue method when adding item to PCLV
B4X:
PCLV.AddItem(130dip,xui.Color_Transparent,swipe.CreateItemValue(GuestId,Array("Edit","Delete")))
B4X:
Private Sub clvGuest_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
swipe.CloseLastSwiped 'always close any open swipe, if not will raise error
For Each i As Int In PCLV.VisibleRangeChanged(FirstIndex,LastIndex)
Dim item As CLVItem = clvGuest.GetRawListItem(i)
Dim swpItem As SwipeItem = item.Value ' value in SwipeItem data type
Dim data As int = swpItem.Value ' get real (GuestId) value of item
...
...
'rest of code
Next
End Sub
Thank you
Last edited: