1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Fix splash screen loading on Android

This commit is contained in:
Fredia Huya-Kouadio
2020-08-19 15:38:50 -07:00
parent 422c279fcb
commit 91a1e4c9ee
7 changed files with 116 additions and 6 deletions

View File

@@ -45,7 +45,7 @@
<activity
android:name=".GodotApp"
android:label="@string/godot_project_name_string"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:theme="@style/GodotAppSplashTheme"
android:launchMode="singleTask"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|density|keyboard|navigation|screenLayout|uiMode"

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,12 @@
<?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:src="@drawable/splash" />
</item>
</layer-list>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="GodotAppMainTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
<style name="GodotAppSplashTheme" parent="@style/GodotAppMainTheme">
<item name="android:windowBackground">@drawable/splash_drawable</item>
</style>
</resources>

View File

@@ -32,9 +32,17 @@ package com.godot.game;
import org.godotengine.godot.FullScreenGodotApp;
import android.os.Bundle;
/**
* Template activity for Godot Android custom builds.
* Feel free to extend and modify this class for your custom logic.
*/
public class GodotApp extends FullScreenGodotApp {
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(R.style.GodotAppMainTheme);
super.onCreate(savedInstanceState);
}
}