Search code examples
nativescriptandroid-statusbar

StatusBar background Color NativeScript


I hide the statusBar in a blank Project ( js , no Framework )

it works almost perfect, but there is 2 Problems:

  1. when I reveal the statusBar by pulling it down, just for 300ms or so it has a white Background until it fully comes down. (Page and action-bar backgroundColor is not white)

  2. statusBar will not goes back automatically up


Solution

  • thanks to Manoj

    this solved the problem:

    var decorView = window.getDecorView();
    
    decorView.setSystemUiVisibility(
       View.SYSTEM_UI_FLAG_FULLSCREEN 
       | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
    );