I use the "Custom listview" by Klaus and I would like to have a "multi select spinner". Klaus refers to the "B4EXCEPT guide/12.4.2 Adding a custom view by code"
I then the class module/custom view is created.
B4X:
Public Sub AddToParent(Parent As Panel, Left As Int, Top As Int, Width As Int, Height As Int)
mBase.Initialize("mBase")
mBase.Color = Colors.Green
Parent.AddView(mBase, Left, Top, Width, Height)
End Sub
Sub Button1_Click
Dim checkedItems As List
checkedItems.Initialize
For i = 0 To clv2.GetSize - 1
Dim p As Panel = clv2.GetPanel(i)
Dim chk As CheckBox = p.GetView(2)
If chk.Checked Then
checkedItems.Add(clv2.GetValue(i))
End If
Next
Log("Checked items: " & checkedItems)
End Sub