Hi everyone
On Android, if I set t.fullscreen = true in love.conf 3 things happen:
1. Safe area disappears
2. The soft buttons disappear
3. The navigation bar disappears
I would like to have only the first and the third ones.
So I've decided to keep t.fullscreen = false, then I've modified SDLActivity.java to hide the navigation bar, but I can't find a way to disable the safe area.
In particular, I would like to switch from this behaviour
to this one.
This issue there is only with Löve 11.3, as with Löve 11.2 I didn't have the safe area.
Thank you
Android full screen with buttons always on
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Android full screen with buttons always on
This is caused because LOVE 11.3 fullscreen code conflicts with SDL. I've fixed this in development branch of love-android. If you don't mind recompiling then you can use that branch, but make sure to checkout the stable LOVE submodule repository.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Re: Android full screen with buttons always on
Unfortunatly that doesn't solve my problem.
Even if I call manually setImmersiveMode(true); the screen is still as in the first image.
Even if I call manually setImmersiveMode(true); the screen is still as in the first image.
Re: Android full screen with buttons always on
This trickier than I thought. Unfortunately you'll have to wait until I have new devices with virtual navigation buttons like your phone, since my current phone has dedicated space for navigation buttons.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Re: Android full screen with buttons always on
Why do you think it's a problem with the buttons? Isn't it a problem with the notch?
Re: Android full screen with buttons always on
It's something have to do with sticky immersive mode if I'm right. LOVE used to have its own "immersive" mode but turns out it causes race condition issue because SDL also has its own immersive mode code, so I removed it.
In 11.2, you should get first image because it always preserve the notch area as non-drawable, whilst in 11.3, the notch area is completely drawable and you have to use love.window.getSafeArea() to query the non-obstructed area.
In 11.2, you should get first image because it always preserve the notch area as non-drawable, whilst in 11.3, the notch area is completely drawable and you have to use love.window.getSafeArea() to query the non-obstructed area.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Re: Android full screen with buttons always on
The issue is with SDLActivity which sets the flags View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_VISIBLE as soon as the app stats in the method handleMessage(Message msg).
It has nothing to do with the cutout mode, although I think the right one for us is LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES and not LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER as in your GameActivity.java.
In fact, even if I set the flags in the method OnCreate() of GameActivity.java, I still get this screen:
But if I remove the line 637 of SDLActivity
I finally get this screen.
Here is my GameActivity.java: https://pastebin.com/03BpxSp1
(I've only added the method removeSafeArea() and called it)
It has nothing to do with the cutout mode, although I think the right one for us is LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES and not LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER as in your GameActivity.java.
In fact, even if I set the flags in the method OnCreate() of GameActivity.java, I still get this screen:
But if I remove the line 637 of SDLActivity
Code: Select all
window.getDecorView().setSystemUiVisibility(flags);
Here is my GameActivity.java: https://pastebin.com/03BpxSp1
(I've only added the method removeSafeArea() and called it)
Re: Android full screen with buttons always on
That's interesting. Thanks for the heads up.
Anyway looks like I got your issue. Unfortunately it's not possible as immersive mode implies hidden soft buttons. Setting fullscreen always hides notification bar and soft buttons.
In development branch, cutout mode is set to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES if the game enters fullscreen, and it sets it back to LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER otherwise.
Anyway looks like I got your issue. Unfortunately it's not possible as immersive mode implies hidden soft buttons. Setting fullscreen always hides notification bar and soft buttons.
In development branch, cutout mode is set to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES if the game enters fullscreen, and it sets it back to LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER otherwise.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Re: Android full screen with buttons always on
I've tried to use your development branch, however, even if I change LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES to LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER, I still get the first image.
Therefore it is definitely a bug.
Therefore it is definitely a bug.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 9 guests