HI, i m using the B4XFloatTextField control in my app.
i want to change the font of the hint text and the text of textField.
The hint text Font is changed but not the text.
1st Try
myTextField.TextField.Font=xui.CreateFont(fx.LoadFont(File.DirAssets,"SOME FONT.ttf",20),20) <<NOT WORKING>>
myTextField.HintFont=xui.CreateFont(fx.LoadFont(File.DirAssets,"SOME FONT.ttf",20),20) <<WORKING>>
2nd Try
Dim jo As JavaObject = myTextField.TextField
jo.runMethod("setFont",Array(fx.LoadFont(File.DirAssets,"SOME FONT.ttf",20))) <<NOT WORKING>>
3rd Try
CSSUtils.SetStyleProperty(myTextField.textField,"-fx-font-family","SOME FONT") <<NOT WORKING>>
4thTry
CSSUtils.SetStyleProperty(myTextField,"-fx-font-family","SOME FONT") <<NOT WORKING>>
When i apply the GetAllViewsRecursive method i found this view
(Text) Text[text="", x=0.0, y=38.0, alignment=LEFT, origin=BASELINE, boundsType=LOGICAL_VERTICAL_CENTER, font=Font[name=System Regular, family=System, style=Regular, size=20.0], fontSmoothingType=LCD, fill=0x000000ff]
ANY IDEA TO SOLVE THIS PROBLEM ???
i want to change the font of the hint text and the text of textField.
The hint text Font is changed but not the text.
1st Try
myTextField.TextField.Font=xui.CreateFont(fx.LoadFont(File.DirAssets,"SOME FONT.ttf",20),20) <<NOT WORKING>>
myTextField.HintFont=xui.CreateFont(fx.LoadFont(File.DirAssets,"SOME FONT.ttf",20),20) <<WORKING>>
2nd Try
Dim jo As JavaObject = myTextField.TextField
jo.runMethod("setFont",Array(fx.LoadFont(File.DirAssets,"SOME FONT.ttf",20))) <<NOT WORKING>>
3rd Try
CSSUtils.SetStyleProperty(myTextField.textField,"-fx-font-family","SOME FONT") <<NOT WORKING>>
4thTry
CSSUtils.SetStyleProperty(myTextField,"-fx-font-family","SOME FONT") <<NOT WORKING>>
When i apply the GetAllViewsRecursive method i found this view
(Text) Text[text="", x=0.0, y=38.0, alignment=LEFT, origin=BASELINE, boundsType=LOGICAL_VERTICAL_CENTER, font=Font[name=System Regular, family=System, style=Regular, size=20.0], fontSmoothingType=LCD, fill=0x000000ff]
ANY IDEA TO SOLVE THIS PROBLEM ???