Skip to content

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

@breautek

Description

@breautek

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 #155 (comment)

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

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions