Good afternoon. I have about twenty labels in an activity, how I can enable or disable all at once. One by one the code is eternal. thanks
Have you tried:Good afternoon. I have about twenty labels in an activity, how I can enable or disable all at once. One by one the code is eternal. thanks
For Each v As View In Activity
If v Is Label Then v.enabled = false
Next
For Each v As View In Activity
If v Is Label Then
v.enabled = True
v.Visible=True
End If
Next
I do not think the above will work because edittext views are also considered label. Therefore, they will also be disabled, unless of course you do not have edittext in tyour panel or activity. Perhaps, you can stick something in the tag.For Each v As View In Activity
If v Is Label Then v.enabled = false
Next