Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
B4XFloatTextField1.Text = "Some Text"
Dim XTextField As B4XView = B4XFloatTextField1.TextField
Dim XTextFieldParent As B4XView = XTextField.Parent
analyzeCustomView(XTextFieldParent)
'Based on the results, the relevant nodes are the visible panel, the TextField, an Image Field, and 2 labels
Dim XVisiblePanel As B4XView = XTextFieldParent.GetView(0)
XVisiblePanel.Color = xui.Color_Red
XVisiblePanel.Height = 2 * XVisiblePanel.Height
Dim XClose As B4XView = XTextFieldParent.GetView(2)
XClose.TextColor = xui.Color_Yellow
Dim XOK As B4XView = XTextFieldParent.GetView(3)
XOK.TextColor = xui.Color_Green
'the Hint ImageView can be manipulated, but only after sleep(0)! Of course when the text is deleted the Hint reverts back to the original.
'You have to put it in the 'B4XFloatTextField1_Changed' event
'Sub B4XFloatTextField1_TextChanged(old As String, new As String)
' Dim XHint As ImageView = B4XFloatTextField1.TextField.parent.GetView(1)
' If new.Length>0 Then XHint.SetLayoutAnimated(0, 8dip, 8dip, -1, -1)
'End Sub
Sleep(0)
Dim XHint As ImageView = XTextFieldParent.getView(1)
XHint.SetLayoutAnimated(0, 10dip, 10dip, 40dip, 20dip)
End Sub