breautek commented on issue #1557:
URL: 
https://github.com/apache/cordova-android/issues/1557#issuecomment-1422647489

   Thank you for your feature request. I'm going to talk about some claims, 
then briefly discuss where Cordova's responsibilities should focus on, and then 
the rationale for why I closed this request.
   
   > However, on Android this option doesn't exist and one is forced to go 
through the process of setting up an XML file with all the properties. 
   
   This is not true. In the older splashscreen system, you would have to have 
separate files for each density but with Android's official splashscreen 
support, it accepts a single drawable, which can be either a scale-able vector 
or a **rasterized PNG**.
   
   The minimum required configuration for Android is:
   
   ```xml
   <platform name="android">
       <preference name="AndroidWindowSplashScreenAnimatedIcon" 
value="res/screen/android/splashscreen.xml" />
   </platform>
   ```
   
   Where the resource can be an XML or **PNG**.
   
   The image does have to obey a set of conditions for it to display properly. 
Android will not display the entire canvas. This is also true if you're using 
the single-image approach for the iOS counterpart depending on the device and 
orientation of that device. So special care is required when creating your 
graphics.
   
   We have a [dimension reference 
link](https://developer.android.com/develop/ui/views/launch/splash-screen#splash_screen_dimensions)
 posted on our 
[documentation](https://cordova.apache.org/docs/en/11.x/core/features/splashscreen/index.html#android-specific-information)
 that explains how the splashscreen image should be crafted.
   
   E.g. if you use an icon background your canvas should be 240x240dp and your 
icon should be in the center 160dp diameter of that canvas. If you use space 
outside of that 160dp diameter, it may be clipped. _If you're using a 
rasterized image, then you should operate in a `xxxhdpi` pixel space, so you 
multiply all `dp` units by 4._ Otherwise you'll get pixelated/blurry images on 
larger resolution devices.
   
   > If Cordova could generate the XML file for me I would be very happy.
   
   Unfortunately, what you're asking here is an image processing software that 
is able to take a graphic and intelligently guess where it should be placed, 
depending on it's size and potential padding around it's own individual canvas. 
This will quickly become rather complex once you start attempting to reduce 
opinions in the image processing.
   
   Cordova's main concern is being a packager, so this is out of scope of what 
the Apache Cordova should assume responsibility for. Therefore if that kind of 
software is truly desirable, then it will be best inside the third-party 
community where it can be maintained and managed independently of Apache 
Cordova, but can still interop with Cordova via hooks for example.
   
   So with all due respect, for the reasons and explanation above, I believe 
it's in Apache Cordova's best interest for not accepting this feature request. 
This isn't to say the feature is not useful, it's just that we must ensure that 
we do our primary job and we do that job well. Trying to take an image and 
craft an end-product with it without forcing opinions that may or may not align 
with the developers does not fit into that primary job, which is to package 
your assets into a native project wrapper. So for this reason, I'm closing this 
feature request.


-- 
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]

Reply via email to