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

Game elements hidden under camera notch - Android 15 #12982

Open
1 task done
Thomas-N opened this issue Feb 19, 2025 · 6 comments
Open
1 task done

Game elements hidden under camera notch - Android 15 #12982

Thomas-N opened this issue Feb 19, 2025 · 6 comments
Labels

Comments

@Thomas-N
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Game Version

4.15.11

Describe the bug

On my phone, Unciv seems to be using the entire screen, without considering the camera notch. This leaves some UI elements hidden under the notch. I couldn't find any display settings to change this behaviour. It occurs both in portrait and in landscape mode.

I have previously played Unciv on the same phone without this bug. However, that was on an older OS version and an older Unciv version. After recently upgrading my OS, I decided to install Unciv again. It's not clear if the OS upgrade or a recent Unciv version introduced this behaviour.

Steps to Reproduce

I guess this is device specific, so it's probably not easy to reproduce on a different device.

Screenshots

No response

Link to save file

No response

Operating System

Android

Additional Information

LineageOS 22.1 (Android 15) on a Xiaomi Poco F1

@Thomas-N Thomas-N added the bug label Feb 19, 2025
@yairm210
Copy link
Owner

Options -> Advanced -> Enable using display cutout areas should be 'false' by default and this should tell the OS to not render there
If that's not helping, this sounds like an OS-specific issue and there's not much we can do about it :/

@yairm210 yairm210 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2025
@maxashen
Copy link

I installed Unciv on a stock Pixel 7a and experienced the same issue.

In particular I'm looking at lines 98 to 106 of src/com/unciv/app/AndroidDisplay.kt,

params.layoutInDisplayCutoutMode = when { enabled -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES else -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER }

As of Android 15, these values are ignored and interpreted as LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS. So I think if you want to keep your UI out of the camera's hole in the screen, for Android 15 and up, you will have to change something on your end.

@yairm210
Copy link
Owner

A. Thanks for that! Great investigation 👍🏿
B. Urrrgh Android Y U do this 😢

@ceresward
Copy link

I am experiencing the same issue on Pixel 7a and Android 15. I can confirm I have the setting disabled ('Enable using display cutout area'), and yet the game is still using the cutout area. It had been working recently, I guess it probably broke when I updated my phone to Android 15.

I hope you can fix it, it's still mostly playable for me but my front camera cutout frequently blocks important info or makes unit action buttons difficult to press

@yairm210 yairm210 reopened this Feb 28, 2025
@yairm210 yairm210 changed the title Game elements hidden under camera notch Game elements hidden under camera notch - Android 15 Feb 28, 2025
@maxashen
Copy link

maxashen commented Feb 28, 2025 via email

@SomeTroglodyte
Copy link
Collaborator

Urrrgh Android Y U do this

Indeed. That's some aggressive kicking of dev's in the - but then wasn't 15 called Upside Down Cake? No, that was 14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants