Android Question LAYOUT PRESENTATION

Giusy

Active Member
Licensed User
hi, I want to create the first page of my program (title and nice image)
I have create a layout
Activity.LoadLayout("presentation")

and then a sleep routine (3 seconds)

Sub WaitFor(Milliseconds As Int)
Dim Present As Long
Present = DateTime.Now
Do While DateTime.Now < Present + Milliseconds

Loop
End Sub

But the program wait 3 seconds and after the page appear and disappear :(

how can I do?
Thanks
 

udg

Expert
Licensed User
Longtime User
Search for "splashscreen" or "splash screen". There are a few alternatives or you could code one yourself.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Search the forum for 'splash screen', there are a few examples including one from RandonCoder and also one from Erel, there are others too...
 
Upvote 0

Yayou49

Active Member
Licensed User
You can also use a timer as follow:


B4X:
Sub Process_Globals

    Private T1 As Timer
    
End Sub


Sub Activity_Create(FirstTime As Boolean)
    
    Activity.LoadLayout("Layout1")
    T1.Initialize("T1",3000)
    T1.Enabled = True
    

End Sub

Sub T1_tick
    
    StartActivity("News")
        
End Sub
 
Upvote 0
Top