cordova-plugin-statusbar icon indicating copy to clipboard operation
cordova-plugin-statusbar copied to clipboard

[Android] Statusbar doesn't remember background color when overlay mode changes

Open breautek opened this issue 6 years ago • 0 comments

Bug Report

Problem

The statusbar forgets its background color when StatusBar.overlaysWebView(true) is invoked or toggled.

What is expected to happen?

The statusbar to retain its background color when overlaysWebView is called. overlaysWebView should only change the overlay state, not the statusbar color.

What does actually happen?

The statusbar always goes to a completely transparent color on StatusBar.overlaysWebView(true)

Information

Originally the bug was discovered at https://github.com/apache/cordova-plugin-statusbar/issues/155#issuecomment-537295382

Command or Code

StatusBar.overlaysWebView(true);
StatusBar.backgroundColorByHexString('#33000000'); // Statusbar is a slightly transparent gray here, as expected
...
StatusBar.overlaysWebView(false); // statusbar goes black as expected
...
StatusBar.overlaysWebView(true); // statusbar should be slightly transparent gray

Another example:

StatusBar.backgroundColorByHexString('#FF0000'); // status bar is red
StatusBar.overlaysWebView(true); // status bar is overlayed but loses its color.
StatusBar.overlaysWebView(false); // status bar goes back to black, should be red

Environment, Platform, Device

Android 9

Version information

Cordova 9, cordova-android 9, statusbar 2.4.3

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

breautek avatar Oct 02 '19 01:10 breautek