Skip to content

Cordova plugin to enable transparent status bar on Android devices

Notifications You must be signed in to change notification settings

manugando/cordova-plugin-transparent-status-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-transparent-status-bar

Cordova plugin to enable transparent status bar on Android devices

Example of app using this plugin

How it Works

Just install the plugin and insert into your code:

Transparentstatusbar.init(function(result) {
  // ....
});

The result variable will be:

  • 1 if the status bar is transparent
  • 0 if the status bar is not transparent (Android version < KITKAT)
  • -1 if there was an error

If the status bar is transparent, in your body tag there will be a new class: has-transparent-statusbar. You can use it to apply specific styles to your app only when the status bar is transparent.

Compatibility with cordova-plugin-statusbar plugin

To use this plugin with cordova-plugin-statusbar (for instance, if your app runs also on iOS and you want to style the iOS status bar with cordova-plugin-statusbar plugin) you have to add this row to your config.xml file:

<platform name="android">
  <preference name="StatusBarBackgroundColor" value=""/>
</platform>

App using cordova-plugin-transparent-status-bar

Do It!

About

Cordova plugin to enable transparent status bar on Android devices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published