I have a CustomListView that contains in each panel a label and a B4XSwitch. I'm trying to get the status (on or off) of all the B4XSwitch buttons that the list contains. I tried the code:
but the line: Dim sw As B4XSwitch = v gives an error: Types do not match. How can I identify the button?
Another problem (not so disturbing) is that the list panels overlap over the list border...I was unable to set them correctly .... (see attached picture)
B4X:
For i = 0 To clv.GetSize - 1
Dim p As Panel = clv.GetPanel(i)
For Each v As View In p.GetAllViewsRecursive
If v Is Label Then
Dim lbl As Label = v
selectedMarimi.Add(lbl.Text)
End If
If v Is B4XSwitch Then
Dim sw As B4XSwitch = v
selectedValues.Add(sw.Tag)
End If
Next
Next
Another problem (not so disturbing) is that the list panels overlap over the list border...I was unable to set them correctly .... (see attached picture)
B4X:
Dim p As Panel
p.Initialize("")
p.Tag = i
p.SetLayout(0, 0, clv.AsView.Width, 40dip)
p.LoadLayout("itemDrawerGrafice")