Created
January 27, 2021 10:39
-
-
Save auyanik/381bd9bb3e5873ea6382828df83370e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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