Update the splash screen logic for the Godot app template

Due to limitations to the splash screen introduced in Android 12, the splash screen logic is updated to the same logic as used on other platforms, i.e: the splash screen is rendered by the Godot engine instead of the Android runtime.
This commit is contained in:
Fredia Huya-Kouadio
2024-06-09 17:02:03 -07:00
parent dd966f5680
commit f20e21a6d6
9 changed files with 32 additions and 156 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/splash_bg_color" />
<item>
<bitmap
android:gravity="center"
android:filter="false"
android:src="@drawable/splash" />
</item>
</layer-list>

View File

@@ -3,8 +3,17 @@
<style name="GodotAppMainTheme" parent="@android:style/Theme.Black.NoTitleBar"/>
<style name="GodotAppSplashTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen">
<item name="android:windowBackground">@drawable/splash_drawable</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<style name="GodotAppSplashTheme" parent="Theme.SplashScreen">
<!-- Set the splash screen background, animated icon, and animation
duration. -->
<item name="android:windowSplashScreenBackground">@mipmap/icon_background</item>
<!-- Use windowSplashScreenAnimatedIcon to add a drawable or an animated
drawable. One of these is required. -->
<item name="windowSplashScreenAnimatedIcon">@mipmap/icon_foreground</item>
<!-- Set the theme of the Activity that directly follows your splash
screen. This is required. -->
<item name="postSplashScreenTheme">@style/GodotAppMainTheme</item>
</style>
</resources>