cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lazza <...@git.apache.org>
Subject [GitHub] cordova-plugin-statusbar pull request #77: CB-10879: (android) Enable overla...
Date Mon, 27 Feb 2017 09:24:36 GMT
Github user Lazza commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-statusbar/pull/77#discussion_r103163815
  
    --- 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 --
    
    Reflection is not the approach used by Android Studio in handling any of the platform
specific code. In fact, reflection has other drawbacks such as being slow and making debugging
harder.
    
    The code uses a version check which is recognized by the standard Android build process
and it works fine also on e.g. Android API 19 and other versions.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message