Android: restore the system bars when leaving fullscreen on API 30+#16001
Conversation
My old PR libsdl-org#15867 switched the fullscreen path to WindowInsetsController.hide() for API 30+, because the legacy setSystemUiVisibility() flags are ignored on API 30+. The leaving fullscreen path was left untouched: it still calls setSystemUiVisibility(SYSTEM_UI_FLAG_VISIBLE), which is equally ignored on API 30+. As a result, once fullscreen had hidden the status/navigation bars, they never came back when returning to windowed mode.
8bc47de to
44ae2a7
Compare
|
@AntTheAlchemist, can you confirm whether this is a good fix, and takes care of the issues you're seeing? |
|
Thanks @klirktag. @slouken, this fixes the return of the status and the nav bar. But other problems remain: On API 30, the initial non-fullscreen window is sized to the safe zone. Going fullscreen resizes the window to the entire screen, as expected, but returning from full screen, leaves the window size full screen. Expected: initial windowed window should be the whole screen. This works as expected on API 34 & 35. On all APIs the safe zone never changes. Expected: it should expand into status and nav bars when they are hidden. |
|
@AntTheAlchemist, can you open those as separate issues for tracking? @klirktag are you able to take a look at them? |
Description
My old PR #15867 switched the fullscreen path to WindowInsetsController.hide() for API 30+, because the legacy setSystemUiVisibility() flags are ignored on API 30+.
The leaving fullscreen path was left untouched: it still calls setSystemUiVisibility(SYSTEM_UI_FLAG_VISIBLE), which is equally ignored on API 30+.
As a result, once fullscreen had hidden the status/navigation bars, they never came back when returning to windowed mode.
This PR fixes that issue.
Existing Issue(s)
issue #15912