-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation splashscreen #1274
Comments
Can someone add an example of that Because at the moment I have the structure mentioned in the documentation but we don't know how to create a good xml. |
The cordova hello world app uses https://github.com/apache/cordova-android/blob/master/templates/project/res/drawable/ic_cdv_splashscreen.xml However, it looks like it's not really following the recommended sizing. Cordova uses the Icon with background setting, so the android docs states:
Looks like our vector is a 512x512dp instead of 240x240. It still does the job appearently but I'd probably recommend trying to follow the Android suggested sizing here. To parse out what android expects, it expects 240x240dp canvas with your "icon" graphic fitting inside 160dp circle in the center. Everything outside of that circle is an unsafe area that might be masked away. It may be clipped when drawn, or during any android animations. Note that android expects an Android Vector Drawable (AVD) which is different from an SVG. I believe a SVG may work but android doesn't implement a full SVG feature set and using something that android doesn't have implement will result in a crash. Android Studio does have a tool to convert SVGs and and PSD files into AVDs.
Personally I use rasterized PNGs in my projects with no problems but they are less efficient and not recommended by Android. Namely because importing PSDs using that aforementioned tool doesn't appear to work for me :/ |
In my old version project my xml was:
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:
Generally speaking, the <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 |
I think currently using a simple PNG directly with |
I'm not really sure if I'm really understanding the question here. If you're asking what XML places the icon in that circle, it's the If you're asking if I have an XML vector that draws a circle then No... I don't have sample XML that does that on hand, but that circle is imaginary, unless if you want to draw an actual circle. It's just that your icon content should fit inside that space and not use the edges/corners of the canvas. See this example graphic... This is an example provided by Android. Their GMail logo fits within the 160dp diameter circle and does not exceed the space outside of it. The "circle" is not visible, it's just used to describe how to author your graphic. |
Feature Request
Motivation
We should make the documentation for the splashscreen easier to find and understand. Some people approached me and asked for help because getting the splashscreens right can be hard.
Status quo
Refrence -> Core Features -> Splashscreen
. I think it should be right the the next to the icons in Create AppsRoom for improvement
I will talk to some people and try to make a few small changes that improve this. Feel free to help here:
Any further ideas?
The text was updated successfully, but these errors were encountered: