Can B4XDialog be displayed twice ?
like the first open ShowCustom then open the B4XInputTemplate but the ShowCustom doesn't close or still appears.
like the first open ShowCustom then open the B4XInputTemplate but the ShowCustom doesn't close or still appears.
B4X:
Sub btnCustom_Click
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 300dip, 200dip)
p.LoadLayout("CustomDialog")
dialog.PutAtTop = True 'put the dialog at the top of the screen
Wait For (dialog.ShowCustom(p, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
dialog.Show(fieldFirstName.Text & " " & fieldLastName.Text, "OK", "", "")
End If
End Sub
Sub Button1_Click
Dim input As B4XInputTemplate
input.Initialize
input.RegexPattern = ".+" 'require at least one character
Wait For (dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
dialog.Show(input.Text, "OK", "", "")
End If
End Sub