Android Question Annoying black/gray screen before the app start

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone, I finished my app, but there is an imperfection that annoy me..
Before the app actually start there is a black/gray screen.
The problem is that in the main Activity_Create is veeeery simple, same for Starter Service

it is just:

B4X:
Sub Activity_Create(FirstTime as Boolean)
    Activity.Loadlayout("layout")
    Sleep(1500)

    If (File.ReadString(---,---) == "---") Then
        StartActivity(Conf)
    Else
        StartActivity(Home)
    End If
  
    Activity.Finish
End Sub

Thanks in advance
 
Last edited:

Mike1970

Well-Known Member
Licensed User
Longtime User
If the layout is large then you can split it into multiple files, load the first one and later load the others.

Sorry Erel, i didn't understand what you mean .

My ideal goal is to show immediatly the background with the logo.

What do you mean by "split into multiple file"? the layout is composed by only 4 images, set in the designer.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
I drastically reduced the time of startup, removing a webview i forgot there unused, and by compressing ALL the images i use in the app using this website.
I changed the theme, as you suggested.

Now instead of gray, it appears white, for a fraction of time.
If someone knows how to simulate something like "launchscreen" of iOS, this would be ideal.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
why do you have sleep() after you load your layout?
does the layout file include the logo? do you want to show first the logo then after 1.5 sec start an activity?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…