Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova cordova-plugin-statusbar StatusBarOverlaysWebView not working

I added the https://github.com/apache/cordova-plugin-statusbar plugin. Now setting the

<preference name="StatusBarOverlaysWebView" value="false" />

still does not work (false and true) and it is always overlaping in IOS 7. But setting

<preference name="StatusBarStyle" value="lightcontent" />

works normal and I am able to use different status bar colors. So for me it looks like the plugin is basically working. Has someone a idear what I do wrong?

Thx! cheers

like image 621
PowPi Avatar asked Jan 03 '16 19:01

PowPi


2 Answers

Try to add following lines in config.xml:

<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#165769" /> <!--Your color value will go here-->
<preference name="StatusBarStyle" value="lightcontent" />
like image 186
Dhruv Avatar answered Oct 02 '22 15:10

Dhruv


I found out the reason, you should add plugin js in your html.

First, you should include "cordova.js" in your html.

<script type="text/javascript" src="cordova.js"></script>

Second, you may found platform_www under folder ./platforms/ios/platform_www. Please copy all the files into your www folder.

Then, you can find, it works.

like image 42
杨文锦 Avatar answered Oct 02 '22 15:10

杨文锦