Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 350dip, 350dip) 'set the content size
p.LoadLayout("layLogin")
Dim rs As ResumableSub = Dialog.Show(Activity, p, "Login", "", "Cancelar")
Wait For (rs) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
CallSubDelayed3(sWS, "Login", txtNombre.Text, txtClave.text)
End If