Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Better fullscreen support. #520

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MohammedKHC0
Copy link

This flag is needed to properly hide display cutout on Android devices,
Without it a black space appears on the status bar.
Refer to
https://stackoverflow.com/questions/49190381/fullscreen-app-with-displaycutout

This flag is needed to properly hide display cutout on Android devices, Without it a black space appears on the status bar.
Refer to
https://stackoverflow.com/questions/49190381/fullscreen-app-with-displaycutout
@not-fl3
Copy link
Owner

not-fl3 commented Jan 27, 2025

IIRC FLAG_FULLSCREEN was deprecated and now we need to do some manual work with hiding the status bar. If it is not hidden - its probably a bug and is worth doing some research on what went wrong in miniquad's implementation!

This constant was deprecated in API level 30. Use WindowInsetsController.hide(int) with Type.statusBars() instead.

@MohammedKHC0
Copy link
Author

MohammedKHC0 commented Jan 27, 2025

Hmm. You are right about that, it's deprecated. What i would typically do to hide everything is to use WindowInsetsControllerCompat. But because MiniquadActivity is not a subclass of AppCompatActivity, I think the best solution is to check if api >= 30, and then hide display cutout and status bar using WindowInsetsController..
I changed the code based on what WindowInsetsContollerCompat do. Please review it.

@MohammedKHC0 MohammedKHC0 changed the title Android: Adding FULLSCREEN flag when the window is fullscreen. Android: Better fullscreen support. Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants