Android Question Extra Screen When App Loading

WDK

Member
Licensed User
When my app is loading, I get a screen pop up with for a split second before my main screen is loaded. Is there a "splash screen" that pops up when the app is loaded? Once the app is in memory, this layout does not show up again.

The layout is blank except for a title bar. The name of the app is in the title bar.

I do have the title bar shut off in my main module so I don't even know how the title would load.

upload_2017-11-27_12-14-2.png


Thanks for any help!
WDK
 

WDK

Member
Licensed User
This is my activity_create. I added a breakpoint when I load my apps main screen. The screen that pops up happens before line 74 is run.

upload_2017-11-27_12-57-48.png


This is the screen that pops up for a couple of seconds. I was able to capture it:
Screenshot_2017-11-27-12-54-03.png

Then when I go past the debug statement (line 74), my app loads:
Screenshot_2017-11-27-12-51-58.png
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
You need to turn the title off in the Activity Attributes region:

B4X:
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True    'Change to false
#End Region

Do you see the black screen when the app is run in release mode?
 
Upvote 0

WDK

Member
Licensed User
Yes I do see the screen in release mode. What is making it even more confusing is it is happening before my first command in the Starter. It is not evening making it to my Main module before the screen pops up. Below I added a breakpoint to line 17 and the screen popped up already.

upload_2017-11-27_13-21-41.png
 
Upvote 0

WDK

Member
Licensed User
Steve,

Thanks for this info. I will try to change the manifest to see if this helps. Since it is happening immediately in the Startup, I assume the manifest is where I can take care of this. Never thought to make any changes there. Learn something new everyday!

Warren
 
Upvote 0

WDK

Member
Licensed User
I just want to thank everyone for their input, I added the following in my Manifest and this resolved my issue:

SetActivityAttribute(Main, android:theme, "@android:style/Theme.NoTitleBar.Fullscreen")

Thanks,
Warren
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Your solution is not good enough as it will cause your app to use Android 2 theme.

You can instead add this to the manifest editor:
B4X:
SetApplicationAttribute(android:theme, "@style/MyTheme")
CreateResource(values-v20, theme.xml,
<resources>
  <style name="MyTheme" parent="@android:style/Theme.Material">
   <item name="android:windowActionBar">false</item>
  <item name="android:windowNoTitle">true</item>
  </style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
  <style
  name="MyTheme" parent="@android:style/Theme.Holo">
     <item name="android:windowActionBar">false</item>
  <item name="android:windowNoTitle">true</item>
  </style>
</resources>
)
 
Upvote 0
Top