Android Question XUI View

Star-Dust

Expert
Licensed User
I'm using the new B4X XUIView library.
I created an InputDialog with B4XInputDialog, but I do not understand how to start the window with a preset initial value.

I did it but it does not work:
B4X:
InputTemplate.Initialize
    InputTemplate.lblTitle.Text = "New Number"
    InputTemplate.RegexPattern="\d+"
    InputTemplate.Text=100
    'InputTemplate.TextField1.Text=Num+1
    Wait For (Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)

How should i do?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Use ConfigureForNumbers for numeric inputs: [B4X] Input dialogs with XUI Views
This will set the keyboard type.

2. Your code is correct. I'm uploading v1.61 which fixes this issue.

3. Note that it is possible to modify the dialog after it is shown:
B4X:
Dim rs As ResumableSub = Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")
InputTemplate.TextField1.Text = 2323
 Wait For (rs) Complete (Result As Int)
 
Upvote 0

Star-Dust

Expert
Licensed User
Thank's
 
Upvote 0
Top