' Set padding on all views to zero.
For Each v As View In Activity.GetAllViewsRecursive
If v Is Button Then
Dim jo As JavaObject = v
jo.RunMethod("setPadding", Array As Object(0, 0, 0, 0))
End If
If v Is EditText Then
Dim jo As JavaObject = v
jo.RunMethod("setPadding", Array As Object(0, 0, 0, 0))
End If
If v Is Label Then
Dim jo As JavaObject = v
jo.RunMethod("setPadding", Array As Object(0, 0, 0, 0))
End If
Next
'Klaus's code snippet
SetTextSize(Label1, "Label1 Text")
' Set text size to Label1.textsize.
For Each v As View In Activity.GetAllViewsRecursive
If v Is Button Then
Dim jo As JavaObject = v
jo.RunMethod("MethodName",Parameters)
End If
If v Is EditText Then
Dim jo As JavaObject = v
jo.RunMethod("MethodName",Parameters)
End If
If v Is Label Then
Dim jo As JavaObject = v
jo.RunMethod("MethodName",Parameters)
End If
Next