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)
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)