Android Question AS_TextFieldAdvanced Title font and IputType

Rafael Grossi

Member
Licensed User
Hello,

How can I change the font size, typeface and even the font of the title of an textfieldadvanced?
And, can I deal with InputType or anything similar for the textfield, to led the keyboard to write first character upper case, or all characters upper case, etc?

Thanks!
 
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
How can I change the font size, typeface and even the font of the title of an textfieldadvanced?
with the AS_TextFieldAdvanced1.Title property
Example:
B4X:
    AS_TextFieldAdvanced1.Title.xFont = xui.CreateDefaultBoldFont(15)
    AS_TextFieldAdvanced1.Refresh

And, can I deal with InputType or anything similar for the textfield, to led the keyboard to write first character upper case, or all characters upper case, etc?
You can access the native textfield with AS_TextFieldAdvanced1.TextField and then search in the forum
 
Upvote 0

Rafael Grossi

Member
Licensed User
Title issue solved!

About the InputType issue, I used to do this with standard edittext this way:
B4X:
EditText1.InputType = Bit.Or(EditText1.INPUT_TYPE_TEXT, 8192)
But I can't do this:
B4X:
AS_TextFieldAdvanced1.TextField.InputType = Bit.Or(AS_TextFieldAdvanced1.INPUT_TYPE_TEXT, 8192)
The code above doesn't work. So I did:
B4X:
    Dim jo As JavaObject = AS_TextFieldAdvanced1.TextField
    jo.RunMethod("setInputType", Array(Bit.Or(0x00000001, 0x00002000)))
And problem solved.
Thanks Alexander and thanks ChatGPT!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…