EnriqueGonzalez Well-Known Member Licensed User Longtime User Jun 2, 2015 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Jun 3, 2015 #2 This is not a bug. Buttons are subclasses of Labels so a button can be treated as a label. https://www.b4x.com/android/forum/threads/getview-is-problem.18524/
This is not a bug. Buttons are subclasses of Labels so a button can be treated as a label. https://www.b4x.com/android/forum/threads/getview-is-problem.18524/
Cableguy Expert Licensed User Longtime User Jun 3, 2015 #3 So basically, first check if it is a button and take it of the list!
EnriqueGonzalez Well-Known Member Licensed User Longtime User Jun 3, 2015 #4 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
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