fix: 修复开屏画面失效的问题

This commit is contained in:
maotoumao
2025-05-10 22:32:04 +08:00
parent 3466f46e3c
commit 776a197969
6 changed files with 16 additions and 20 deletions
+6 -5
View File
@@ -62,11 +62,11 @@ react {
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
//
// Added by install-expo-modules
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
//
// Added by install-expo-modules
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
}
/**
@@ -186,5 +186,6 @@ dependencies {
implementation 'com.facebook.fresco:animated-gif:2.5.0'
// https://mvnrepository.com/artifact/net.jthink/jaudiotagger
implementation 'net.jthink:jaudiotagger:2.2.5'
implementation 'androidx.core:core-splashscreen:1.0.0'
}
+1 -1
View File
@@ -24,7 +24,7 @@
>
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme"
android:theme="@style/Theme.App.SplashScreen"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 19 KiB

+8 -1
View File
@@ -4,7 +4,14 @@
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="android:windowBackground">@drawable/splashscreen</item> <!-- this line instructs the system to use 'splashscreen.xml' as a background of the whole application -->
</style>
<!-- Splash screen -->
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/splashscreen_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splashscreen_image</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
<item name="android:windowSplashScreenBrandingImage">@drawable/spashscreen_branding_image</item>
</style>
</resources>
+1 -13
View File
@@ -1,16 +1,4 @@
{
"name": "MusicFree",
"displayName": "MusicFree",
"expo": {
"plugins": [
[
"expo-splash-screen",
{
"backgroundColor": "#27282C",
"image": "./android/app/src/main/res/drawable/splashscreen_image.png",
"imageWidth": 200
}
]
]
}
"displayName": "MusicFree"
}