Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How hide and show status bar

Just it, I have found how to hide title bar but I didnt find how hide / show the status bar pressing a button fr example. It is possible? thanks!

like image 971
ƒernando Valle Avatar asked Dec 11 '22 16:12

ƒernando Valle


1 Answers

For poeple whose show part is not working , You can try following code

Show Status Bar

   if (Build.VERSION.SDK_INT < 16) {
              getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
    else {
       View decorView = getWindow().getDecorView();
      // show the status bar.
       int uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
       decorView.setSystemUiVisibility(uiOptions);
    }
like image 95
Pradeep Avatar answered Jan 06 '23 20:01

Pradeep