Detection when ui system is visible with sticky immersive mode

When using the sticky dive mode ( https://developer.android.com/training/system-ui/immersive.html ), neither View.OnSystemUiVisibilityChangeListener nor any visibility flags will be cleared (for example, View.SYSTEM_UI_FLAG_HIDE_NAVIGATION):

Sticky flag is the interface that you see if you use the IMMERSIVE_STICKY flag and the user browses to display the system panels. Translucent bars temporarily appear and then hide again. The breakout act does not clear the flags and does not cause the visibility of your system user interface to change listeners, since the transitional view of system bars is not considered a change in the visibility of the user interface.

I have a view with complex gesture detection code. Scrolling down to show system navigation, ui interferes with these gestures. If I use the normal dive mode, I can check that the ui navigation system is visible, in which case I ignore gestures, but with a sticky mode, which cannot be verified (as explained above).

Does anyone know how to determine if the ui navigation system is visible in sticky dive mode, or does anyone have another idea how to deal with the down dip that is interfering with my own gesture detection code?

I know about this issue Detection, when the system buttons are visible when using the "immersive mode" , but I saw applications that use a sticky dive mode with detection of gestures that will not get confused when scrolling down.

+4
source share

All Articles