For Each v As View In Activity.GetAllViewsRecursive
If v Is EditText And Diko.ContainsKey(v.tag) Then
v.TextColor = 0xFF6361FF
End If
Next
Of course it does not work since v is a view and not an EditText. But, would it be possible somehow to cast v to EditText so I can access the view's properties ?
For Each v As View In Activity.GetAllViewsRecursive
If v Is EditText And Diko.ContainsKey(v.tag) Then
Dim vedt as EditText = v
vedt.TextColor = 0xFF6361FF
End If
Next
That's very interesting. I would have expected it to throw an error if there were any views other than EditTexts in the activity as the generated Java loop code casts each view in turn to an EditText. I wonder why that cast doesn't error for your Labels
B4X:
_e = new anywheresoftware.b4a.objects.EditTextWrapper();
...
for (; index1 < groupLen1;index1++){
_e.setObject((android.widget.EditText)(group1.Get(index1)));
For Each v As View In Activity.GetAllViewsRecursive
If v Is EditText And Diko.ContainsKey(v.tag) Then
Dim vedt as EditText = v
vedt.TextColor = 0xFF6361FF
End If
Next
That's very interesting. I would have expected it to throw an error if there were any views other than EditTexts in the activity as the generated Java loop code casts each view in turn to an EditText. I wonder why that cast doesn't error for your Labels
B4X:
_e = new anywheresoftware.b4a.objects.EditTextWrapper();
...
for (; index1 < groupLen1;index1++){
_e.setObject((android.widget.EditText)(group1.Get(index1)));