Android Question CLV, get a cards tag

james_sgp

Active Member
Licensed User
Longtime User
I`ve been scratching my head on this all morning.... I have a XCLV, that is filled using 'layout cards'. Each card has a unique tag (written when created), my question is how can I scan thro the XCLV and find if a certain tag is there?

FYI, i`m doing this so I can delete a 'card' if needed.

Thanks, James
 

PaulMeuris

Active Member
Licensed User
You can get to a CustomListView panel with the GetPanel method.
If the panel contains a label, an edittext, a button,... you can check its tag.
Here's some example code:
B4X:
        For i = 0 To clv.Size -1
            Dim pnlitem As Panel = clv.GetPanel(i)
            For Each vw As View In pnlitem.GetAllViewsRecursive
                Dim tg As String = vw.Tag
                If tg.StartsWith("edt_") Then
                    valuelst.Add(vw.As(EditText).Text)
                End If
            Next
        Next
 
Upvote 0

james_sgp

Active Member
Licensed User
Longtime User
Thanks, but i need to actually check the tag of the panel. But giess i can move the tag, so ur code wud work.
 
Upvote 0
Top