Sub InitView
PCLV.Initialize(Me, "PCLV", CustomListView1)
For i = 0 To 60 Step 3
PCLV.AddItem(40dip,xui.Color_LightGray,Array(i, i + 1, i + 2))
Next
PCLV.ShowScrollBar = False 'no fast scrolling
PCLV.ExtraItems = 5
PCLV.Commit
End Sub
Sub CustomListView1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
For Each i As Int In PCLV.VisibleRangeChanged(FirstIndex, LastIndex)
Dim item As CLVItem = CustomListView1.GetRawListItem(i)
Dim pnl As B4XView = xui.CreatePanel("")
item.Panel.AddView(pnl, 0, 0, item.Panel.Width, item.Panel.Height)
Dim data() As Object = item.Value
pnl.LoadLayout("item")
Button1.Text = data(0)
Button2.Text = data(1)
Button3.Text = data(2)
Next
End Sub