In a fragment I have implemented a
so that I can enter/exit immersive mode when
is used to move between these fragments on swipe left/right. If you enter immersive mode then swipe to a new fragment the UI remains in immersive mode.
However, in the
method of the new fragment I need to detect whether the UI is in immersive mode to when creating my listener.
I have tried calling
on the new view but this returns
Is there a method for detecting whether the application is in immersive mode from any view or fragment regardless of whether that initiated the transition to immersive mode?