how to hide navigation and app bar in Android app using Kotlin

 


Taluy-app

val windowInsetsController =
            WindowCompat.getInsetsController(window, window.decorView)
        
        windowInsetsController.systemBarsBehavior =
            WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
        window.decorView.setOnApplyWindowInsetsListener { view, windowInsets ->
            windowInsetsController.hide(WindowInsetsCompat.Type.systemBars())
            view.onApplyWindowInsets(windowInsets)
        }

Comments

Popular Posts