List of usage examples for android.widget FrameLayout setSystemUiVisibility
public void setSystemUiVisibility(int visibility)
From source file:com.sabaibrowser.UI.java
protected void setImmersiveFullscreen(boolean enabled) { FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView(); int systemUiVisibility = decor.getSystemUiVisibility(); final int bits = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; if (enabled) { systemUiVisibility |= bits;/* ww w .ja v a 2 s . com*/ } else { systemUiVisibility &= ~bits; } decor.setSystemUiVisibility(systemUiVisibility); }