Github user macdonst commented on a diff in the pull request: https://github.com/apache/cordova-plugin-statusbar/pull/77#discussion_r103127274 --- Diff: src/android/StatusBar.java --- @@ -164,4 +181,21 @@ private void setStatusBarBackgroundColor(final String colorPref) { } } } + + private void setStatusBarTransparent(final boolean transparent) { + if (Build.VERSION.SDK_INT >= 21) { + final Window window = cordova.getActivity().getWindow(); + if (transparent) { + window.getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + window.setStatusBarColor(Color.TRANSPARENT); --- End diff -- This method was only introduced in API level 21 so you should use the same approach as `setStatusBarBackgroundColor` and call it via reflection. In fact you'd be better off refactoring `setStatusBarBackgroundColor` so you don't end up repeating a bunch of code.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org