Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Dim Page1 As FirstPage
Dim timSplash As Timer
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
CSSUtils.SetBackgroundImage(B4XPages.GetNativeParent(Me).RootPane, File.DirAssets, "B4R_512_512_transparent.png")
'B4XPages.GetNativeParent(Me).RootPane.Alpha = 0
'B4XPages.GetNativeParent(Me).RootPane.SetAlphaAnimated(2000, 1)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub B4XPage_Appear
timSplash.Initialize("timSplash", 500)
timSplash.Enabled = True
End Sub
Sub timSplash_Tick
timSplash.Enabled = False
Page1.Initialize
B4XPages.AddPageAndCreate("Page1", Page1)
B4XPages.ShowPageAndRemovePreviousPages("Page1")
End Sub