You've already forked godot
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:
@@ -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"
|
||||
|
||||
BIN
platform/android/java/app/res/drawable/splash.png
Normal file
BIN
platform/android/java/app/res/drawable/splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
platform/android/java/app/res/drawable/splash_bg_color.png
Normal file
BIN
platform/android/java/app/res/drawable/splash_bg_color.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
12
platform/android/java/app/res/drawable/splash_drawable.xml
Normal file
12
platform/android/java/app/res/drawable/splash_drawable.xml
Normal 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>
|
||||
9
platform/android/java/app/res/values/themes.xml
Normal file
9
platform/android/java/app/res/values/themes.xml
Normal 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>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user