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
CB-2606 add icon support #126
Conversation
}; | ||
|
||
icon.prototype = { | ||
add:function(elt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add() and remove() don't seem to be used at all (other than in tests). I think they can be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not used. I included them because the other "classes" (access, preference) have the same methods.
Are they used for e.g. preference somewhere? If yes, then I guess the same reasons to have them for preference apply to icon as well.
…opy icons for this platform
@AxelNennker, could you please rebase your code on top of the apache master? I don't see, for example, config_parser.js anymore. It was renamed plus there are new functionality here which may be useful. |
Conflicts: spec/config_parser.spec.js src/config_parser.js
Re-implemented the "magic" for android. Typical sizes on Android are recognized and used. A default icon is copied to all res/drawable-*/ directories. |
In a broad sense this looks reasonable. In the config.xml, why is there width and height attributes when using cdv:platform="android" and cdv:density="mdpi"? Is hope to reuse the same element for iOS and other non-Android platforms? But doing so doesn't seem like it is meant to be compatible with cdv:platform="android". Or is it meant to be an alternate way of specifying cdv:density="mdpi" in the Android case? I don't see where your code uses the "id" attribute in the element. What is that element supposed to do? And what happens when it's not present in the element? It would be great to see some corresponding docs for this (i.e., cordova-docs). Those docs would describe from the end-users view how they would consume this new capability. When it inevitably comes time to do this for splash screens, will this icon approach work for splash screens? |
Add support for <icon> element for windows8 and wp8.
Change getIconBySize behaviour, when one of arguments is not specified.
CB-2606 iOS support and additional improvements
1. iOS, Andoroid, FirefoxOS, Windows8, WP8 2. Related PR with support apache/cordova-cli#126
1. iOS, Andoroid, FirefoxOS, Windows8, WP8 2. Related PR with support apache/cordova-cli#126
Something goes wrong with this branch and the pull request. Our commits must be on top of apache/master head and we should see only those commits. Right now there is unrelated work here. As simplest solution propose to clean history and create new single commit. Axel, you can force push my branch if you want/ok |
Hi @AxelNennker, I'm just trying to get this merged ASAP so I've opened a separate PR which constants the same changes but re-based and could be merged. Feel free to close the new PR if you feel we should better to complete organizing this one. Thx! |
1. iOS, Andoroid, FirefoxOS, Windows8, WP8 2. Related PR with support apache/cordova-cli#126
Merged in as PR#166 |
Hi |
https://cordova.apache.org/docs/en/3.5.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens <platform name="android"> res is NOT relative to the www directory but to the project directory, which is one above www. You can use "cordova platform add android -d" to view (error) messages. |
Yes I have follow the above procedure by putting res folder outside www and also follow the cordova documentation but still the icon doesn't change for my application . |
This is a 3.5 feature. Are you using the latest cordova version? |
Thanks. The problem get solved by using the updated version. |
Hi I am integrating the icon for my app as using the trailing code but I am unable to add splashscreen to my app ,can you suggest anything.
|
Hi I want to ask that can I add custom splashscreen to my project without making any changes in platforms folder . |
Yes I have used these methods but these all suggest to replace the image into platforms folder that means to add manually but I want to add splashscreen without making changes to platforms folder as we can add app icon in 3.5 version. |
In the latest commits I removed the restriction that icons are in specific directories below project_dir.
Now icon_src is taken as the source without prepending specific directories