Hide Status Bar in Android with Phonegap Build

I have enabled fullscreen in the config.xml file but when the keyboard appears ,status bar is shown also and stays there unless i tap on it.There is a way to avoid this in Ios but i haven't find anything for android.At least can i tap the status bar programmaticaly with jquery?



You can try setting

<preference name="Fullscreen" value="true" /> 

in the config.xml


I had this same issue and what fixed this for me was adding this line to the config.xml file:

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

Then updating my code on PGB.

  1. Install StatusBar plugin: cordova plugin add cordova-plugin-statusbar

  2. Update config.xml: <gap:plugin name="com.phonegap.plugin.statusbar" />

  3. Hide bar on startup or when you need it. StatusBar.hide();

See https://github.com/phonegap-build/StatusBarPlugin plugin for more information.


I tried removing:

<preference name="StatusBarBackgroundColor" value="#ee6e73" />

from config.xml - no joy. Tried adding:

<preference name="Fullscreen" value="true" />

to config.xml - also no joy. Inverting:

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


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

provided no solution. In all cases, the status bar shows with the keyboard, but doesn't ever go away. Ended up solving it with JavaScript:

$("body").on("blur.app", "input", StatusBar.hide);

The status bar still shows with the keyboard, but is dismissed with the blur event.


For me it worked to install the latest version, see this updated answer:

Actually, there is a fix for cordova-plugin-statusbar that has been committed on github and should land in version 2.1.4+ To get the latest cordova-plugin-statusbar now, type

cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git The statusbar should now stay hidden when interacting with inputs, keyboard etc.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.