Skip to content

Commit

Permalink
fix(android): maintain status bar color during splash (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbannigan authored Mar 19, 2020
1 parent d035939 commit 59fcf9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions android/capacitor/src/main/java/com/getcapacitor/Splash.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ private static void buildViews(Context c) {
}

splashImage = new ImageView(c);


splashImage.setFitsSystemWindows(true);

// Hide status bar during splash screen.
Boolean splashFullScreen = Config.getBoolean(CONFIG_KEY_PREFIX + "splashFullScreen", DEFAULT_SPLASH_FULL_SCREEN);
if(splashFullScreen){
Expand Down Expand Up @@ -236,7 +238,7 @@ public void run() {

WindowManager.LayoutParams params = new WindowManager.LayoutParams();
params.gravity = Gravity.CENTER;
params.flags = a.getWindow().getAttributes().flags & (WindowManager.LayoutParams.FLAG_FULLSCREEN);
params.flags = a.getWindow().getAttributes().flags;

// Required to enable the view to actually fade
params.format = PixelFormat.TRANSLUCENT;
Expand Down

0 comments on commit 59fcf9e

Please sign in to comment.