Description of the problem: When starting an app, during the Splash Screen, the Status Bar will first set it's style/background color to the one defined my project, then the screen will blink, the Status Bar will be automatically set to its default style (Black background with white text) and only when the splash screen hides, it'll show my custom style again (either the one in the XML file, or inside my angular application defined via the Plugin). I need to be able to define the status bar color and style shown during the Splash Screen.
Affected platform
OS of the development machine
Other information: -
Capacitor version: 1.1.0
node version: v11.8.0
npm version: 6.9.0
CocoaPods version: -
Steps to reproduce: Create a brand new project, build project for the first time and open in Android Studio. Then set the Status Bar style either by:
<item name="android:windowLightStatusBar">true</item>
<item name="android:statusBarColor">#ecf0f1</item>
or define some custom colors via:
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
or Set the Status Bar color via the Plugin:
this.platform.ready().then(() => {
StatusBar.setBackgroundColor({ color: '#ecf0f1' });
StatusBar.setStyle({ style: StatusBarStyle.Light });
SplashScreen.hide();
});
i'm observing similar behaviour on iOS. something briefly shows the statusbar during the splash screen and only after i hide it, the Statusbar is set according to my settings. I have set the appropriate values in Info.plist as well as via the Plugin interface.
I see the same black flash in both the status and navigation bar on Android when the app finishes loading, has anyone found a workaround?
@chriswep If your issue was on iOS13 (i guess it was), then I fixed it in #2098. Give it a try.
On some Android devices, the default color of the navigation bar is not black. It's a device difference, but Android lets you specify the color of the navigation bar. The status bar is also the same. However. I've applied a style, but Android still shows a black status bar and a black navigation bar when splash is displayed.
wops, linked PR was wrong and doesn't fix this issue, reopening
@jcesarmobile my bad, sorry...
It's still happening for me, and I can't find any way around it. Does anyone have a workaround, however ugly it is ?
Just opened a PR to fix this: #2603
Hello there.
I realise this thread is closed and the PR merged, but... is it really solved?
I'm still facing this issue ....
What about you, guys? @sbannigan? @jcesarmobile?
Regards!
Most helpful comment
Hello there.
I realise this thread is closed and the PR merged, but... is it really solved?
I'm still facing this issue ....
What about you, guys? @sbannigan? @jcesarmobile?
Regards!