If objt Is Label Then tipo = "Label"
If objt Is Button Then tipo = "Button"
If objt Is EditText Then tipo = "EditText"
If objt Is ImageView Then tipo = "ImageView"
If objt Is Panel Then tipo = "Panel"
If tipo.EqualsIgnoreCase("panel") Or tipo.EqualsIgnoreCase("Button") Then carrgar = False
If Funcoes.Ta_bom(objt, "Text") Then m.Put("Text" , objt.Text)
If Funcoes.Ta_bom(objt, "TextColor") Then m.Put("TextColor" , objt.TextColor)
If Funcoes.Ta_bom(objt, "TextSize") Then m.Put("TextSize" , objt.TextSize)
If Funcoes.Ta_bom(objt, "Top") Then m.Put("Top" , objt.Top)
If Funcoes.Ta_bom(objt, "Left") Then m.Put("Left" , objt.Left)
If Funcoes.Ta_bom(objt, "Width") Then m.Put("Width" , objt.Width)
If Funcoes.Ta_bom(objt, "Height") Then m.Put("Height" , objt.Height)
If Funcoes.Ta_bom(objt, "Color") Then m.Put("Color" , objt.Color)
If Funcoes.Ta_bom(objt, "Visible") Then m.Put("Visible" , objt.Visible)
Lista.Add(m)
My solution:
public Sub Ta_bom(Objeto As B4XView, Propriedade As String) As Boolean
Try
Select Propriedade
Case "Text"
Dim s As String = Objeto.text
Case "TextColor"
Dim s As String = Objeto.TextColor