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