Public Sub Initialize
LoadData
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Wait For (ShowSplashScreen) Complete (Unused As Boolean)
LoadLayout
End Sub
Private Sub LoadLayout
Root.LoadLayout("MainPage")
'... code'
InitializePages
End Sub
Private Sub InitializePages
Settings.Initialize
B4XPages.AddPageAndCreate("Settings", Settings)
'...many pages over 20'
End Sub
Sub ShowSplashScreen As ResumableSub
#if B4i
Main.NavControl.NavigationBarVisible = False
Root.LoadLayout("Splash")
ImageView1.SetBitmap(xui.LoadBitmapResize(File.DirAssets, "logo.png", ImageView1.Width, ImageView1.Height, True))
Sleep(3000)
Root.RemoveAllViews
Main.NavControl.NavigationBarVisible = True
#else if B4A
Dim start As Long = DateTime.Now
Do While Activity2.HeightChangedFired = False And DateTime.Now < start + 5000
Sleep(150)
Loop
Root.Height = Activity2.CorrectHeight
#End If
Return True
End Sub