Hi,
I have summarized my codes into a basic one: a layout with just one B4XFloatTextField named "B1" and here is my code:
B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: false
#End Region
Sub Process_Globals
End Sub
Sub Globals
Public FloatText As B4XFloatTextField
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
FloatText.Tag="TAG"
For Each v As B4XView In Activity.GetAllViewsRecursive
If v Is B4XFloatTextField Then
If v.Tag="TAG" Then
Public F As B4XFloatTextField=v
F.Text="F"
Log(F.Tag)
End If
End If
Next
End Sub
the program can't find my B4XFloatTextField by its tag and log is empty!
For Each v As B4XView In Activity.GetAllViewsRecursive
If v.Tag Is B4XFloatTextField Then
Dim f As B4XFloatTextField = v.Tag
If f.Tag="TAG" Then
F.Text="F"
End If
End If
Next
For Each v As B4XView In Activity.GetAllViewsRecursive
If v.Tag Is B4XFloatTextField Then
Dim f As B4XFloatTextField = v.Tag
If f.Tag="TAG" Then
F.Text="F"
End If
End If
Next