+4 votes

How can I adjust my game to scale well on devices with different notch sizes and other safe areas?

I don't want to set a specific top and bottom margin just to avoid the notch, because I'm planning to build on tablets and iPad as well. So I need to maximize the whole screen, and just adjust the UI to the safe area of the device if it has one.

I hope someone could help.

Thank you so much :)

in Engine by (32 points)

3 Answers

+1 vote

I also encountered the same problem, multiple attempts to modify the ''AndroidManifest.xml' but none worked ..
No matter how to adapt and adjust the zoom level,
Safe area always shows nothing..

enter link description here

enter image description here

by (29 points)
0 votes

I would also be interested in that. I have the same problem.

by (80 points)
0 votes

Into android/build/res/values/themes.xml, replace the styles by this code:

<style name="GodotAppMainTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen">
    <item name="android:windowLayoutInDisplayCutoutMode">never</item>
    <item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowTranslucentNavigation">true</item>
</style>

<style name="GodotAppSplashTheme" parent="@style/GodotAppMainTheme">
    <item name="android:windowBackground">@drawable/splash_drawable</item>
    <item name="android:windowLayoutInDisplayCutoutMode">never</item>
    <item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowTranslucentNavigation">true</item>
</style>
by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.