0

How can I make status bar translucent? Whatever change I make, it doesn't reflect in the app. So far I tried this.

StatusBar.styleLightContent();

I also played with StatusBar.overlaysWebView(false);

The result is always this, a white status bar with no text (iOS 12, Cordova 8.1.1):

enter image description here

utiq
  • 1,342
  • 2
  • 17
  • 33
  • I fixed it doing this: https://stackoverflow.com/a/46232813/751524 Now it also works for iPhone X – utiq Nov 09 '18 at 22:00

1 Answers1

0

Add these preferences to your config.xml

<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarCropsWebview" value="false" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="StatusBarBackgroundColor" value="#2980b9" />

Full instructions and options are here: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-statusbar/

Don't forget to make sure your activity indicator is set the same too.

<preference name="TopActivityIndicator" value="white" />

More info on this and the available options here: https://cordova.apache.org/docs/en/latest/config_ref/index.html#feature

John
  • 94
  • 10