Android Question B4XDialog Customizability

red30

Active Member
Licensed User
B4X:
    InputTemplate.lblTitle.Text = "lbl text"
    InputTemplate.TextField1.EditTextHint="hint text"
    InputTemplate.RegexPattern = ("[a-zA-Z0-9]{17}")'<---optional. Remove if not needed
    Wait For (Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)
    If Result = XUI.DialogResponse_Positive Then
        ToastMessageShow(InputTemplate.Text.ToUpperCase,True)
    End If
I am using B4XDialog to make the dialog look lonely on Android and IOS. I ran into a number of questions:
1) How to change the label at the top of the "XUI Views" dialog to any other?
2) How can I change the background color of the XUI Views caption and the color of the OK and Cancel buttons?
3) How do "EditTextHint" change the font size?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Last edited:
Upvote 0

red30

Active Member
Licensed User
Set the hint with InputTemplate.TextField1.HintText, set the font with TextField1.HintFont. Call TextField1.Update after you change the font.
InputTemplate.TextField1.HintText="123"
Doesn't work, gives the error “Unknown member: hinttext”
Can you give an example?
 
Upvote 0

red30

Active Member
Licensed User
I don't think these two above members exist.
Also: InputTemplate.TextField1.HintText should be: InputTemplate.TextField1.EditTextHint
That's right, I don't have them either.
B4X:
Sub SetLightTheme
    Dialog.TitleBarColor = 0xfff6dd66
    Dialog.TitleBarHeight = 60dip
    Dialog.BackgroundColor = XUI.Color_White
    Dialog.ButtonsColor = XUI.Color_White
    Dialog.ButtonsTextColor = Dialog.TitleBarColor
    Dialog.BorderColor = XUI.Color_Transparent
    Dialog.TitleBarTextColor = XUI.Color_Black
End Sub
I have changed some of the colors I need, but I don’t understand how to understand the “InputTemplate.lblTitle.Text” and “InputTemplate.Text” and “InputTemplate.TextField1.EditTextHint” colors?
 
Upvote 0
Top