#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#BridgeLogger:true
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private clv2 As CustomListView
Private xwstep As Int=30dip
Private label1 As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
clv2.Initialize("main","clv2")
Activity.AddView(clv2.AsView,100dip,100dip,100dip,7*xwstep)
For i=1 To 15
clv2.Add(CreateListItem($"Item #${i}"$, 100dip, xwstep), $"Item #${i}"$)
Next
End Sub
Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
p.SetLayout(0, 0, Width, Height)
p.LoadLayout("CellItem")
p.Color=Colors.Transparent
label1.Text = Text
Return p
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub