Skip to content

Instantly share code, notes, and snippets.

@auyanik
Created January 27, 2021 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auyanik/381bd9bb3e5873ea6382828df83370e6 to your computer and use it in GitHub Desktop.
Save auyanik/381bd9bb3e5873ea6382828df83370e6 to your computer and use it in GitHub Desktop.
hideSystemUI() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment