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
Root.LoadLayout("splash") ' <----
Sleep(3000) ' <----
ImageView1.RemoveViewFromParent ' <---- declare ImageView1 As B4XView here, in B4XMainPage
#End If
Return True
End Sub
I don't have B4i, so...!