How to hide the status bar? [SOLVED] – Android Studio


You might need to hide the status bar(formerly known as the notification bar) for some activities like your splash screen activity, etc.

This is very easy to do.

Just adding the following code to the onCreate method of the activity for which you want to hide the status bar:

// Hide the status bar.
        View decorView = getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);

PhD researcher at Friedrich-Schiller University Jena, Germany. I'm a physicist specializing in theoretical, computational and experimental condensed matter physics. I like to develop Physics related apps and softwares from time to time. Can code in most of the popular languages. Like to share my knowledge in Physics and applications using this Blog and a YouTube channel.



Leave a Reply

Your email address will not be published. Required fields are marked *