So if in my select i read n. records, work, if i have in my select one result ( 1 record ) work the first time, but if i repeat a select that give me again 1 record the event no Trigger.
i think that the problem is inside CustomListView here:
B4X:
Private Sub UpdateVisibleRange
If MonitorVisibleRange = False Then Return
Dim first As Int = getFirstVisibleIndex
Dim last As Int = getLastVisibleIndex
If first <> FirstVisibleIndex Or last <> LastVisibleIndex Then
FirstVisibleIndex = first
LastVisibleIndex = last
CallSubDelayed3(CallBack, EventName & "_VisibleRangeChanged", FirstVisibleIndex, LastVisibleIndex)
End If
End Sub
Why this line:
If first <> FirstVisibleIndex Or last <> LastVisibleIndex Then....
So if in my select i read n. records, work, if i have in my select one result ( 1 record ) work the first time, but if i repeat a select that give me again 1 record the event no Trigger.
Hi Erel.
I have a Edit text where i insert what i want to look for and I get the result back ( is simple select )
So for example if i search for "xxxx" i get 3 records, if i search "yyyy" i get 1 records. If i try to perform a search that returns me the same number of records (in this case 1) the event is not triggered.
i found the first time "margherita" and i have 2 records, the next time i search "Pizza al taglio farcito" and i have 1 Records,
well if i try with another result that give me again 1 result the event isnt trigger.....
It is not raised because the visible range hasn't changed. You don't need to use lazy loading for short lists. It will only make your program more complicated.
I understand but the initial list is 400 items. For this reason i used.
Anyway i will use both to load a list with many records, the other to do searches with few records
Thank you for your support