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

WIP: (android) Remember statusbar color during overlay state changes

Open breautek opened this issue 4 years ago • 3 comments

Platforms affected

Android

Motivation and Context

Statusbar would override background color to set transparent on overlaysWebView(true) and therefore overlaysWebView(false) will make the statusbar turn black.

This PR keeps track of the background color, in both states so that Fixes #159

Description

Two variables were added to keep the background color in memory, one for the solid statusbar and another for overlayed statusbar.

Calling on backgroundColorByHexString will determine if the statusbar is overlayed and will update the respective variables.

setStatusBarTransparent has been changed so that it now doesn't hard code the statusbar colour and instead will use the variables to change the statusbar color.

By default, the overlay background color defaults to #00000000 (in otherwords, fully transparent). This makes it so, calling on overlaysWebview(true) will hide the statusbar, as it always did before. The overlay background color can be set by supplying a #AARRGGBB hex format to StatusBarBackgroundColor preference.

Testing

npm test and manual testing.

Checklist

  • [x] I've run the tests to see all new and existing tests pass
  • [x] I added automated test coverage as appropriate for this change
  • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [x] I've updated the documentation if necessary

breautek avatar Nov 15 '19 04:11 breautek

Ping @breautek any chance you want to "re-visit" this PR? :)

timbru31 avatar Jan 08 '21 16:01 timbru31

Ping @breautek any chance you want to "re-visit" this PR? :)

Want to... yes

Will have I the time to... that might be a different story...

Is this potentially blocking something?

breautek avatar Jan 08 '21 16:01 breautek

Nope, I was just going through open issues and PRs and Niklas added the 3.0 milestone some time ago.

timbru31 avatar Jan 08 '21 17:01 timbru31