Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
CachedPanels.Initialize
For i = 1 To 200 - 1 Step 4
Dim id1 As ImageData = CreateItem(i)
Dim id2 As ImageData = CreateItem(i + 1)
Dim id3 As ImageData = CreateItem(i + 2)
Dim id4 As ImageData = CreateItem(i + 3)
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, CLV1.AsView.Width, 200dip)
CLV1.Add(p, Array As ImageData(id1, id2, id3, id4))
Next
End Sub
Sub CreateItem (ImageName As String) As ImageData
Dim id As ImageData
id.Initialize
id.FileName = ImageName & ".jpg"
id.Title = id.FileName
Return id
End Sub