When I click an item in Customlistview1, a record of its own is added, but it is added to the end of list instead of showing up under the clicked item bottom of the list, which is what I like to see I like to see the record added for Brandon to be below the last record Shuckert of Stapelton Anthony.
Thank you.
Below is my code to add the record and a screenshot of the customlistview placement of the new record.
Thank you.
Below is my code to add the record and a screenshot of the customlistview placement of the new record.
B4X:
Sub CustomListView1_ItemClick (Index As Int, Value As Object) 'Customlistview1 is the main xCLV
' CustomListView1.AddTextItem(Value, Value) 'This line is just to show which item was clicked
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 100%x, 200dip)
p.LoadLayout("Item") 'Layout has clvItem customlistview
Dim pp As B4XView = xui.CreatePanel("")
pp.SetLayoutAnimated(0, 0, 0, clvItem.AsView.Width, clvItem.AsView.Height/4)
pp.LoadLayout("fourlabels") 'Layout has 4 labels that hold the data
lbl=Array As Label(l1, l2, l3, l4)
lbl(0).Text="2023-02-13"
lbl(1).Text="Brandon"
lbl(2).Text="11:00-12:30"
lbl(3).Text="99999"
clvItem.Add(pp, lbl(1).Text)
CustomListView1.Add(p, Value)
End Sub