You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/02/16 21:19:46 UTC

[GitHub] jcesarmobile closed pull request #432: add Transparent StatusBar Config

jcesarmobile closed pull request #432: add Transparent StatusBar Config
URL: https://github.com/apache/cordova-android/pull/432
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/project/Activity.java b/bin/templates/project/Activity.java
index 567b6c72f..257c74fa6 100644
--- a/bin/templates/project/Activity.java
+++ b/bin/templates/project/Activity.java
@@ -21,6 +21,8 @@ Licensed to the Apache Software Foundation (ASF) under one
 
 import android.os.Bundle;
 import org.apache.cordova.*;
+import android.os.Build;
+import android.view.View;
 
 public class __ACTIVITY__ extends CordovaActivity
 {
@@ -29,6 +31,13 @@ public void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);
 
+        // enable Transparent statusbar when enabled
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && preferences.getBoolean("TransparentStatusBar", false)) {
+            getWindow().getDecorView().setSystemUiVisibility(
+               View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
+               View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
+        }
+
         // enable Cordova apps to be started in the background
         Bundle extras = getIntent().getExtras();
         if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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