This is tutorial of how to make a splash screen in B4A. There are 3 sections. Just copy and past the code. In the designer save the layout as "LayoutMain.bal" and make a "Panel1" in that layout. "Panel1" will be the splash screen. You can change the length of the the timer from 3000 millisecs (3 seconds) to a different number if you want. Hope this helps.
===========================================
1) dim 'Timer1' in globals so subroutine can see it (remember case sensitive)
Sub Globals
Dim Timer1 As Timer
===========================================
2) Create a layout in the designer "LayoutMain.bal". In there make "Panel1" with the splash screen. Make sure it's set to visible in the designer. You might want to bring Panel1 to front (in the designer, click on the panel and then at top bring to front). "("Timer1", 3000)" sets the screen to 3 seconds.
Sub Activity_Create(FirstTime As Boolean)
'--------------------------------------------------
'Display layout
Activity.LoadLayout("LayoutMain.bal")
'--------------------------------------------------
'splash screen - title screen - 2 secs
Panel1.Visible=True
Timer1.Initialize("Timer1", 3000)
Timer1.Enabled=True
===========================================
3) Create a subroutine with this. This turns off the panel AND turns off the timer.
Sub Timer1_tick
Panel1.Visible=False
Timer1.Enabled = False
End Sub
===========================================
4) Remember the B in BASIC stands for beginners!!!!!!
===========================================
1) dim 'Timer1' in globals so subroutine can see it (remember case sensitive)
Sub Globals
Dim Timer1 As Timer
===========================================
2) Create a layout in the designer "LayoutMain.bal". In there make "Panel1" with the splash screen. Make sure it's set to visible in the designer. You might want to bring Panel1 to front (in the designer, click on the panel and then at top bring to front). "("Timer1", 3000)" sets the screen to 3 seconds.
Sub Activity_Create(FirstTime As Boolean)
'--------------------------------------------------
'Display layout
Activity.LoadLayout("LayoutMain.bal")
'--------------------------------------------------
'splash screen - title screen - 2 secs
Panel1.Visible=True
Timer1.Initialize("Timer1", 3000)
Timer1.Enabled=True
===========================================
3) Create a subroutine with this. This turns off the panel AND turns off the timer.
Sub Timer1_tick
Panel1.Visible=False
Timer1.Enabled = False
End Sub
===========================================
4) Remember the B in BASIC stands for beginners!!!!!!