Hi
in xCustomListView,there is VisibleRangeChanged event that have FirstIndex and LastIndex
According of below code,we show data in list
In this code,what is ExtraSize? why 20 value for it?
in xCustomListView,there is VisibleRangeChanged event that have FirstIndex and LastIndex
According of below code,we show data in list
B4X:
Sub CLV1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
Dim ExtraSize As Int = 20
For i = Max(0, FirstIndex - ExtraSize) To Min(LastIndex + ExtraSize, clv1.Size - 1)
Dim p As B4XView = clv1.GetPanel(i)
If p.NumberOfViews = 0 Then
'**************** this code is similar to the code in CreateItem from the original example
p.LoadLayout("f2")
p.GetView(0).Color = Colors.RGB(Rnd(1,255),Rnd(1,255),255)
p.GetView(1).Tag = i
End If
Next
End Sub
In this code,what is ExtraSize? why 20 value for it?
Last edited: