Bug? Button traspassing is label

EnriqueGonzalez

Well-Known Member
Licensed User
Hi!

I think i just found a bug with the following code

For Each d As View In p.GetAllViewsRecursive
If d Is Label Then
If d.Tag = b.Tag Then
d.RemoveView
End If
End If
Next

i have a button that traspass the If d is label then, and gets removed.
 

Cableguy

Expert
Licensed User
So basically, first check if it is a button and take it of the list!
 

EnriqueGonzalez

Well-Known Member
Licensed User
Thanks! the code that i used at the end was this one!

For Each d As View In p.GetAllViewsRecursive
If GetType(d) = "android.widget.TextView" Then
If d.Tag = "la" & b.Tag Then
d.RemoveView
End If
End If
Next
 
Top