Sub SetHintColor(tf As TextField, disabledcolor As Int,enableadcolor As Int,txt As String)
Dim no As NativeObject = tf
Dim attr As AttributedString
attr.Initialize(tf.HintText, tf.Font, enableadcolor)
'These two lines also change the color of the hint text when it is placed on the top left (i.e., main text is not null) and the view is a FLoatLabeledTextField
If tf Is FloatLabeledTextField Then
no.SetField("floatingLabelFont", Font.DEFAULT_ITALIC)
no.SetField("floatingLabelActiveTextColor",no.ColorToUIColor(enableadcolor)) '<-- Set color when view is focused
no.SetField("floatingLabelTextColor",no.ColorToUIColor(disabledcolor)) '<-- Set color when view is not focused
Dim s As AttributedString
s.Initialize(txt, Font.DEFAULT_ITALIC, disabledcolor)
no.RunMethod("setAttributedPlaceholder:", Array(s))
End If
End Sub