Skip to content

Commit 59fcf9e

Browse files
authored
fix(android): maintain status bar color during splash (#2603)
1 parent d035939 commit 59fcf9e

File tree

1 file changed

+4
-2
lines changed
  • android/capacitor/src/main/java/com/getcapacitor

1 file changed

+4
-2
lines changed

android/capacitor/src/main/java/com/getcapacitor/Splash.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ private static void buildViews(Context c) {
5353
}
5454

5555
splashImage = new ImageView(c);
56-
56+
57+
splashImage.setFitsSystemWindows(true);
58+
5759
// Hide status bar during splash screen.
5860
Boolean splashFullScreen = Config.getBoolean(CONFIG_KEY_PREFIX + "splashFullScreen", DEFAULT_SPLASH_FULL_SCREEN);
5961
if(splashFullScreen){
@@ -236,7 +238,7 @@ public void run() {
236238

237239
WindowManager.LayoutParams params = new WindowManager.LayoutParams();
238240
params.gravity = Gravity.CENTER;
239-
params.flags = a.getWindow().getAttributes().flags & (WindowManager.LayoutParams.FLAG_FULLSCREEN);
241+
params.flags = a.getWindow().getAttributes().flags;
240242

241243
// Required to enable the view to actually fade
242244
params.format = PixelFormat.TRANSLUCENT;

0 commit comments

Comments
 (0)