Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
pnlTitle.Visible = False
pnlTitle.SetLayoutAnimated(0, 0, 0, CLV1.AsView.Width, TitleHeight + DividerHeight)
pnlTitle.LoadLayout("CellTitle")
AddTitle("Title #AAA")
For i = 1 To 10
CLV1.Add(CreateListItem(100%x,10%y),i)
Next
AddTitle("Title #BBB")
For i = 11 To 21
CLV1.Add(CreateListItem(100%x,10%y),i)
Next
AddTitle("Title #CCC")
For i = 22 To 32
CLV1.Add(CreateListItem(100%x,10%y),i)
Next
CLV1_ScrollChanged(0)
End Sub
Sub CreateListItem(Width As Int, Height As Int) As Panel
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, Width, Height)
p.LoadLayout("2")
Return p
End Sub