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);

[wpedon id="7041" align="center"]

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.