Hello everyone,
i'm new of B4A/B4X in general ^^
I have tried create a simple app whit an splash screen and after 2 sec. go in login page like:
in a 2nd page, i try manage the exit whit this logic:
when i press back button incur in an exception..
Sub B4XPage_CloseRequest was not found
obviously if i put the exit logic in the main page all works fine, but if i want continue thou this way, which event i must use?
i'm new of B4A/B4X in general ^^
I have tried create a simple app whit an splash screen and after 2 sec. go in login page like:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
vLogin.Initialize
B4XPages.AddPage("viewLogin", vLogin)
CallSubDelayed(Null, "ShowLogin")
End Sub
...
Private Sub ShowLogin
Sleep(2000)
B4XPages.ShowPageAndRemovePreviousPages("viewLogin")
End Sub
in a 2nd page, i try manage the exit whit this logic:
Public Sub B4XPage_CloseRequest As ResumableSub
Dim sf As Object = xui.Msgbox2Async("Sicuro di voler chiudere l'applicazione?", "Attenzione", "Si", "", "No", Null)
Wait For (sf) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Return True
End If
Return False
End Sub
when i press back button incur in an exception..
Sub B4XPage_CloseRequest was not found
obviously if i put the exit logic in the main page all works fine, but if i want continue thou this way, which event i must use?