Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
For i = 1 To 10
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, CustomListView1.AsView.Width, 300dip)
p.LoadLayout("Item")
Dim table As B4XTable = p.GetView(0).Tag 'https://www.b4x.com/android/forum/threads/117992/#content
FillTable(table)
CustomListView1.Add(p, "")
Next
End Sub
Sub FillTable (Table As B4XTable)
Table.AddColumn("Col 1", Table.COLUMN_TYPE_NUMBERS)
Table.AddColumn("Col 2", Table.COLUMN_TYPE_NUMBERS)
Dim data As List
data.Initialize
For i = 1 To 50
data.Add(Array(i, i))
Next
Table.SetData(data)
End Sub