Well, if someone is interested, I solved my problem as follows: Added a transparent view of the window manager with a width of 1px and a height of match_parent. Then a global layout receiver is added to this view, and every time there is a change in the layout, I check the position of this view on the screen. If Y is 0, the status bar is not visible, so a full-screen application should work. This works even better than the native View.OnSystemUiVisibilityChangeListener, because it seems that there are some applications that somehow do not start this method (for example, new weather in Yahoo).
source share