Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override fun onWindowFocusChanged(hasFocus: Boolean) {
- super.onWindowFocusChanged(hasFocus)
- if (hasFocus) hideSystemUI()
- }
- private fun hideSystemUI() {
- window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
- or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
- or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
- or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
- or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
- or View.SYSTEM_UI_FLAG_FULLSCREEN)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement