Simone4e commented on issue #1274: URL: https://github.com/apache/cordova-docs/issues/1274#issuecomment-1611315766
> > That code resizes the image, is there no way to use similar code for the new version using variants in PNG? > > Two things I think worth mentioning on this: > > 1. The android's splashscreen system is vastly different than what Cordova had implemented via the splashscreen plugin. What you get to control is the background colour of the splashscreen and a small area, about the same size as an app icon, that's about it. So those existing launch screens that you had before will not work on Android's splashscreen system. > 2. I'm not sure on the rationale on this, but Cordova writes the splashscreen icon asset to the `drawable-nodpi` directory, which effectively tells Android that that asset is to be used for all densities. I'm not sure if this is a _requirement_ of Android's splashscreen API. > > Generally speaking, the `....../src/res/` directory has several sub directories like `mipmap-<density>` where you can place different resolution images by density and the android system will pick up the appropriate one to use. But I'm not sure if Android obeys this for the splashscreen given that Cordova doesn't seem to do this. Cordova via splashscreen settings doesn't expose this, but once you have a working splashscreen image, you **could** try using > > ``` > <resource-file src="mySrc/res/android/xxxhdpi-splashicon.png" target="res/mipmap-xxxhdpi/ic_cdv_splashscreen.png" /> > ``` > > But honestly, I don't really see the point in doing that unless if you actually have problems rendering `xxxhdpi` assets on lower end devices. And if that's the case, might be better just to get an AVD instead. I think currently using a simple PNG directly with `<preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/screen/android/drawable-xxhdpi/screen.png" />`, you mentioned earlier changing the diameter of the circle it contains the image, is there the relative xml code string? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
