In my activity I go fullscreen to hide the status bar and navigation bar using this code:
window.apply {
decorView.systemUiVisibility = (
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
or View.SYSTEM_UI_FLAG_IMMERSIVE
)
addFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN
or WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
)
}
Android make it so the status bar and navigation bar can still temporary appear with a slide from the bottom or the top of the screen, how can I detect when this event happen? (it seems possible since the default Actionbar automatically show/hide with the status bar)