Sub btnGetWifiData_Click
Dim dialogPanel As B4XView = xui.CreatePanel("")
dialogPanel.SetLayoutAnimated(100, 0, 0, 300dip, 250dip)
dialogPanel.LoadLayout("wificredentials")
thewifidialog.PutAtTop = True
'Set the default value for the only item on the Layout
b4xFTF_SSID.Text = myMLWifiObject.WifiSSID
thewifidialog.GetButton(xui.DialogResponse_Positive).Enabled = False
Wait For (thewifidialog.ShowCustom(dialogPanel, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Log(b4xFTF_SSID.Text)
Else
Log("Nothing entered.")
End If