I create my phonegap app and everythings works, but the splash screen makes me crazy. It will be shown but not in perfect aspect ratio (tested on nexus 6). It will be squeezed in the width.
My current splash screen config.xml
<gap:splash src="www/res/screen/android/land_xxhdpi.png" />
<gap:splash src="www/res/screen/android/ldpi.png" gap:platform="android" gap:qualifier="port-ldpi"/>
<gap:splash src="www/res/screen/android/mdpi.png" gap:platform="android" gap:qualifier="port-mdpi"/>
<gap:splash src="www/res/screen/android/hdpi.png" gap:platform="android" gap:qualifier="port-hdpi"/>
<gap:splash src="www/res/screen/android/xhdpi.png" gap:platform="android" gap:qualifier="port-xhdpi"/>
<gap:splash src="www/res/screen/android/xxhdpi.png" gap:platform="android" gap:qualifier="port-xxhdpi"/>
<gap:splash src="www/res/screen/android/land_ldpi.png" gap:platform="android" gap:qualifier="land-ldpi"/>
<gap:splash src="www/res/screen/android/land_mdpi.png" gap:platform="android" gap:qualifier="land-mdpi"/>
<gap:splash src="www/res/screen/android/land_hdpi.png" gap:platform="android" gap:qualifier="land-hdpi"/>
<gap:splash src="www/res/screen/android/land_xhdpi.png" gap:platform="android" gap:qualifier="land-xhdpi"/>
<gap:splash src="www/res/screen/android/land_xxhdpi.png" gap:platform="android" gap:qualifier="land-xxhdpi"/>
<preference name="SplashScreenBackgroundColor" value="#e8413d" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3500" />
<preference name="SplashMaintainAspectRatio" value="false" />
Any idea what can i do? 9 patch doesnt work for me, i dont know why, i dont understand that tool.
Hope anybody can help
Change this preference to true:
<preference name="SplashMaintainAspectRatio" value="true" />
It will keep your splash aspect ratio, and make the splash image fill your screen without being stretched. Think of it as the equivalent of css style background-size: cover;
To cover the patch-9 logo in all android versions, i had to do:
<preference name="SplashScreen" value="background" />
and disable the MaintainAspectRatio value:
<!-- <preference name="SplashMaintainAspectRatio" value="true" /> -->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With