Android Question customlistview checkbox example

Addo

Well-Known Member
Licensed User
Longtime User
i have followed the tutorial of CLV

i come to this point

B4X:
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
           ' Here instead of adding to list i wanted to get all values in one string
        End If
    Next
End Sub

i am trying to get the value of items that checked in one string value instead of adding to a list is that possible ?
 

mangojack

Expert
Licensed User
Longtime User
B4X:
Sub Button1_Click
    Dim myString As String
    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
            myString = myString & clv2.GetValue(i)
        End If
    Next
    Log("Checked items: " & myString)
End Sub
 
Upvote 0
Top