Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private CLV1 As CustomListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
CLV1.Add(CreateListItem("Access type", CLV1.AsView.Width, 60dip), "AccessType")
CLV1.Add(CreateListItem("Access date", CLV1.AsView.Width, 60dip), "StartDate")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, Width, Height)
p.LoadLayout("CellItem")
Return p
End Sub
Private Sub CLV1_ItemClick (Index As Int, Value As Object)
ToastMessageShow(Index,True)
' CLV1.RemoveAt(Index)
' CLV1.InsertAtTextItem(Index,"JABA",Value)
CLV1.GetPanel(0).GetView(Index).Text = "NEW TEXT HERE"
End Sub