Sub SafeShowPage(PageID As String)
' Always delay the page switch to make sure the Activity and fragments are ready
CallSubDelayed2(Me, "InternalShowPage", PageID)
End Sub
Private Sub InternalShowPage(PageID As String)
If B4XPages.GetPage(PageID) <> Null Then
B4XPages.ShowPage(PageID)
Else
Log("Page " & PageID & " does not exist.")
End If
End Sub