Android Question RemoveView error

nibbo

Active Member
Licensed User
Longtime User
Hi, I am trying to loop through a scroll view and remove panels with a known tag.
I have tried the code below:
B4X:
    For Each v As View In sv.Panel
        If v.Tag="XXX" Then
            v.RemoveView
        End If
    Next
This seems to work for the first 3 or 4 but then fails saying java.lang.RuntimeException: Object should first be initialized (View).
 
Top