'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
Page1.Initialize
B4XPages.AddPage("Page1", Page1)
xDialog.Initialize(Root)
Dim RS As ResumableSub = xDialog.Show("Message", "Yes", "No", "Cancel")
xDialog.GetButton(xui.DialogResponse_Cancel).As(JavaObject).RunMethod("setCancelButton",Array(True))
xDialog.GetButton(xui.DialogResponse_Positive).RequestFocus
Wait For (RS) Complete (Result As Int)
Log("Result: " & Result)
End Sub