Closed jDavid95 closed 5 months ago
If anybody is looking for a solution to this:
this is how I solved (with the way my config looks like):
I just needed to use a splash in PNG, and get rid of the resource file merging to the 'colors.xml'. Though I know this is not the best implementation since the values of the resource file got merged into the colors.xml, it solves the issue.
This can be caused if something is overwriting the colors.xml
resource file and doesn't properly include cdv_splashscreen_background
color.
I believe the ionic framework is a common example that clashes with Cordova with this.
I don't really consider this a bug but I'll attach this to a v13 milestone. Personally I think we should be namespacing our resource files to avoid clashes. But changing the resource file location may be breaking, so it may have to wait for the next major.
I had the same issue and could to change splash screen background color..
config.xml
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
After this line i added background color change config like this
<preference name="AndroidwindowSplashScreenBackground" value="#E2AD81" />
colors.xml
<?xml version='1.0' encoding='utf-8'?>
<resources xmlns:tools="http://schemas.android.com/tools">
<color name="cdv_splashscreen_background">#E2AD81</color>
</resources>
themes.xml `<?xml version='1.0' encoding='utf-8'?>
`
ionic cordova prepare android
ionic cordova build android --minifycss --optimises --minifyjs --prod --release
it is working for
I´m trying to set a background for my splashscreen, but it´s not working, it either shows a white or black/charcoal background (which is not the one I want to use). I´m currently on Cordova-Android 11 Phone brands tested: Pixel (emulator), Xiaomi's (real), and Samsung(real)
this is how my config.xml looks like:
I included all the platform section in case something else is messing with the background.