Rlemm1991
Rlemm1991

Reputation: 505

Cordova Statusbar plugin gap

Trying to get to grips with using Cordova for hybrid app development and I'm really enjoying their plugins, making some task in JS a lot easier to manage.

However I'm having an issue with the Status bar plugin, got a dark theme on the app I'm playing around with, charcoal, dim orange colour and some greys so I'm insistent on using a dark status bar so I've used the status bar plugin, however when I install it it causes a gap between the start of content and status bar.

If i uninstall the plugin the gap disappears and the bar returns to default white but no gap.

in the config.xml I've set

<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="StatusBarStyle" value="lightcontent" /> 

in the JS on device ready function

StatusBar.overlaysWebView(true);

If I set this to true the gap disappears but the status bar goes white and shows the battery icon and nothing else, false set the status bar to colours in the config but the gap appears. I've also tried to hide and show it on load to get it to set right but no luck.

Not really sure how I can get it to sit right.

Upvotes: 2

Views: 86

Answers (1)

Rlemm1991
Rlemm1991

Reputation: 505

After reading some documentation & the link provided by a member in the link I've accepted that its best to please apple by leaving the status bar as default or not use the plugin at all.

Upvotes: 1

Related Questions