Disable status bar

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disable status bar

693 Views
kamilbystryk
Contributor III

I'm looking for a solution to hide status bar in Android LL 5.0.2. Alternatively, it is sufficient to block slide down of status bar. I would like to make a change of source code Launcher2 or SystemUI, without using additional application.

Labels (2)
0 Kudos
2 Replies

537 Views
b36401
NXP Employee
NXP Employee

Here I found an example to hide status bar:

if (Build.VERSION.SDK_INT < 16) { //ye olde method

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,

                    WindowManager.LayoutParams.FLAG_FULLSCREEN);

} else { // Jellybean and up, new hotness

    View decorView = getWindow().getDecorView();

    // Hide the status bar.

    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;

    decorView.setSystemUiVisibility(uiOptions);

    // Remember that you should never show the action bar if the

    // status bar is hidden, so hide that too if necessary.

    ActionBar actionBar = getActionBar();

    actionBar.hide();

}

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

537 Views
kamilbystryk
Contributor III

My guess is that it will hide status bar only when launcher is active? When i start new application, status bar will be back?

Code plce in "on create" method?

0 Kudos