androidcordovaandroid-splashscreen

Cordova splashscreen is restricted to a small circle with Cordova 11.0 and Android 12 API?


I'm doing the migration from Cordova 10.x to 11.x, and followed this article. On the former versions, user must provide the full images for all resolutions and define then using the <splash> tag; now, there's no <splash> tag anymore, but only one image.

The result is that the splashscreen is smaller and restricted to a circle, with radius of 1/3 of the width of the device.

The provided image has no borders, and my config.xml is as follow:

<?xml version='1.0' encoding='utf-8'?>
<widget
  ...
  <platform name="android">
    <preference name="android-targetSdkVersion" value="32" />
    <preference name="AndroidWindowSplashScreenAnimatedIcon" value="splash.png" />
    <preference name="AndroidWindowSplashScreenBackground" value="#FFFFFF" />
  ...

When I send small images, they are placed inside this circle. But bigger images are cropped.

Is it a desirable behavior? If yes, can I customize this size? I coudn't be able to found any way to define it's size at Cordova Docs.

Here goes two printscreens from my mobile device:

Image of Cordova 10 version (desired)

Image of Cordova 11 version (cropped into a circle)

Any ideas ? Thanks in advance!


Solution

  • See this link for sizes. More info about this here