0

For react-native app on Android For the devices with Notch - I am able to use full screen mode on all screens except Splash screen by this code : This code basically uses full screen even behind the notch.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
           WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
    layoutParams.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
    getWindow().setAttributes(layoutParams);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);

}

I need to use full screen mode on Splash screen as well. It shows grey / default bg color as shown below.

t

newdeveloper
  • 1,401
  • 3
  • 17
  • 43
  • Please refer https://stackoverflow.com/a/42586696/11212074 – hong developer Nov 02 '19 at 18:48
  • When I use my drawer layout and then navigation layout in it it shows brown area same as your in the notch. I am also using all your layout param commands after doing so many things, when I remove my drawer layout then my problem solved – Cyborg Aug 01 '20 at 14:51

0 Answers0