Sub Globals
Private txtFirstName As B4XFloatTextField
Private txtLastName As B4XFloatTextField
Private Dialog As B4XDialog
Private xui As XUI
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dialog.Initialize(Activity)
Dialog.Title = "First and last Name"
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 300dip, 400dip)
p.LoadLayout("MyDialog") 'has 2 B4XFloatTextField in this case, one for 1st name, the 2nd for last name
p.SetColorAndBorder(xui.Color_Cyan, 10dip, xui.Color_Red, 20dip)
Dim rs As ResumableSub = Dialog.ShowCustom(p, "OK", "", "CANCEL")
Wait For (rs) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dialog.Show($"Hello ${txtFirstName.Text} ${txtLastName.Text}"$, "OK", "", "")
End If
End Sub