When using sticky immersive mode (https://developer.android.com/training/system-ui/immersive.html) neither the View.OnSystemUiVisibilityChangeListener is called nor will any visibility flags be cleared (like View.SYSTEM_UI_FLAG_HIDE_NAVIGATION):
Sticky flag—This is the UI you see if you use the IMMERSIVE_STICKY flag, and the user swipes to display the system bars. Semi-transparent bars temporarily appear and then hide again. The act of swiping doesn't clear any flags, nor does it trigger your system UI visibility change listeners, because the transient appearance of the system bars isn't considered a UI visibility change.
I have a view with complex gesture detection code. The down swipe to show the system navigation ui does interfere with these gestures. If I use the regular immersive mode I can check for the system navigation ui to be visible in which case I ignore the gestures but with the sticky mode that check is not possible (as explained above).
Does anyone know how to determine if the system navigation ui is visible in sticky immersive mode or does anyone have another idea how to deal with the down swipe that interferes with my own gesture detection code?
I'm aware of this question Detecting when system buttons are visible while using 'immersive mode' but I've seen apps that use sticky immersive mode with gesture detection that don't get messed up by the down swipe.