Sub Globals
Private clv1 As CustomListView
Private lblTitle As B4XView
Private pnlTitle As B4XView
Private pnlExpanded As B4XView
Private xui As XUI
Private expandable As CLVExpandable
Dim Drawer As B4XDrawer
Private Label1 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Activity.LoadLayout("1")
Drawer.Initialize(Me, "Drawer", Activity, 45%y)
Drawer.CenterPanel.LoadLayout("Main")
Drawer.LeftPanel.LoadLayout("1")
expandable.Initialize(clv1)
Dim p As B4XView = CreateItem(Rnd(0xFF000000, 0xFFFFFFFF), "ITEM1", 45%y)
clv1.Add(p, expandable.CreateValue(p, "some value"))
Label1.Text=" pagina iniziale"
End Sub
Sub CreateItem(clr As Int, Title As String, ExpandedHeight As Int) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, clv1.AsView.Width, ExpandedHeight)
p.LoadLayout("Item")
p.SetLayoutAnimated(0, 0, 0, p.Width, p.GetView(0).Height) 'resize it to the collapsed height
lblTitle.Text = Title
pnlTitle.Color = clr
Return p
End Sub
Sub clv1_ItemClick (Index As Int, Value As Object)
expandable.ToggleItem(Index)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
StartActivity(resistenze)