Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private Button1 As Button
Private PCLV As PreoptimizedCLV
Private clv As CustomListView
Private Panel1 As Panel
End Sub
Public Sub Initialize
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
Panel1.color = Colors.Yellow
clv.DefaultTextBackgroundColor = Colors.blue
clv.DefaultTextColor = Colors.white
setItems
Sleep(0)
clv.JumpToItem(clv.Size -1)
End Sub
Sub setItems
Dim sX1 As String
clv.Clear
PCLV.Initialize(Me, "PCLV", clv)
For i = 1 To 2150
sX1 = " this is: " & i
clv.AddTextItem(sX1,"")
Next
PCLV.Commit
End Sub
Sub Button1_Click
clv.JumpToItem(0)
PCLV.B4XSeekBar1_ValueChanged(0)
End Sub
Sub clv_ItemClick (Index As Int, Value As Object)
setItems
Dim pnl As B4XView = clv.GetPanel(Index)
pnl.GetView(0).Text = "clicked"
PCLV.B4XSeekBar1_ValueChanged(Index)
End Sub
Sub clv_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
End Sub