0.1.3 • Published 10 years ago
phonegap-statusbar-tap v0.1.3
Phonegap StatusbarTap
Capture tap events on the status bar.
Installation
<gap:plugin name="phonegap-statusbar-tap" source="npm" version="0.1.0" />
Using
window.addEventListener('statusbarTap', function() {
alert('Statusbar Tap');
});
Useful tricks (config.xml)
Add StatusBar plugin
<gap:plugin name="com.phonegap.plugin.statusbar" />
Set colors
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="StatusBarBackgroundColor" value="#000000" />
Hide status bar
<preference name="StatusBarOverlaysWebView" value="true" />
<gap:config-file platform="ios" parent="UIStatusBarHidden" overwrite="true">
<true />
</gap:config-file>
// Show status bar
window.StatusBar.show();
Change the appearance of status bar. It is based on the style preferred by the view controller that is currently under the status bar. It can fix incorrect color of status bar text.
<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance" overwrite="true">
<false />
</gap:config-file>