Cordova Android splashscreen wrong size and pixelated

556 views Asked by At

I'm using Cordova to build an app running on both iOS and Android.

Cordova version 7.0.1 - Platform Android version 6.2.3

I have a problem on Android about the splashscreen size. I have 6 different PNG size for each density as you can see in the config.xml below.

    <!-- ANDROID SPLASH PREF -->
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="FadeSplashScreen" value="true" />
    <preference name="SplashScreenDelay" value="4000" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="SplashMaintainAspectRatio" value="true" />

    <!-- ANDROID SPLASH PNG -->
    <splash src="www/splashs/android/splash-land-hdpi.png" density="hdpi" />
    <splash src="www/splashs/android/splash-land-ldpi.png" density="ldpi" />
    <splash src="www/splashs/android/splash-land-mdpi.png" density="mdpi" />
    <splash src="www/splashs/android/splash-land-xhdpi.png" density="xhdpi" />
    <splash src="www/splashs/android/splash-land-xxhdpi.png" density="xxhdpi" />
    <splash src="www/splashs/android/splash-land-xxxhdpi.png" density="xxxhdpi" />

Well, when I launch the app on my Lenovo tablet, which has a 800x1280 resolution, it display the wrong PNG file. The app decide to show the LDPI one, with a resolution of 400x240. The result is of course really bad and very pixelated, I can't release my app like that.

I tried on a smartphone Galaxy J, everything works fine, the good PNG size is selected during the splashscreen.

I tried to remove all PNG file except the higher one (1920x1280 xxxhdpi). The app display it but the result is even worst. The image is really even more pixelated... really weird problem.

I didn't find any solution yet on the web. Any ideas?

0

There are 0 answers