#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 400
#End Region
' --> file:///.\Objects\src\b4j\example
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim xui As XUI
Private AnotherDatePicker1 As AnotherDatePicker
Private c0tabCLV_c4list As CustomListView
Private datPanelLabelName As B4XView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("clvpanel") 'Load the layout file.
MainForm.Show
Dim DatMap As Map
DatMap.Initialize
DatMap.Put("Miller", "11.03.2005")
DatMap.Put("Smith", "11.03.2005")
Dim i As Int = 0
For Each k As String In DatMap.Keys
Dim p As B4XView = CreateItem_c4list(k, DatMap.Get(k), i, 300dip ) ' --> In C0FillContentPage_c4list
c0tabCLV_c4list.Add(p, i)
i = i +1
Next
End Sub
private Sub CreateItem_c4list(NameVal As String, DatVal As String, Index As Int, PanelHeight As Int) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, c0tabCLV_c4list.AsView.Width, 200dip)
p.LoadLayout("clvitemdat")
datPanelLabelName.Text = NameVal
AnotherDatePicker1.Date = DateTime.DateParse(DatVal)
Return p
End Sub
Sub AnotherDatePicker1_DateChanged (NewDate As Long)
Log($"New date $Date{NewDate}"$)
Dim adpX As AnotherDatePicker = Sender
' ... get index of clvitem
' ... change underlaying data
' ... modify visible content on edited clvitem panel
End Sub