cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (Akvelon)" <>
Subject RE: [GitHub] cordova-cli pull request: CB-2606 add icon support
Date Thu, 27 Mar 2014 18:54:52 GMT

I'm working on icons support for Windows 8 + WP8 [1] based Axel's branch. On Windows icons
sizes have recommended/predefined sizes so approach where we have width and height as part
of <icon> and which is used to determinate what image must be replaced looks reasonable
and easy to use.

As for special predefined folder structure for icons. In this case we don't need <icon>
element in config.xml at all since we can always iterate through predefined folder and copy
all found icons to corresponding place in Android platform.


-----Original Message-----
From: Axel Nennker [] 
Sent: Thursday, March 27, 2014 7:53 PM
To: dev
Subject: Re: [GitHub] cordova-cli pull request: CB-2606 add icon support

any comments on this method/implementation?
Wishes for an alternative implementation?

I know that not all like the "guessing" part...


maybe this is liked by more of you?:

<icon src="some/path/icon.png"> // iconpath=some/path and iconname=icon.png would lead
to this pseudocode implementation on Android:

for (dir in res/drable-*)  { // e.g. dir=drawable-hdpi  if (fs.exists(path.join(iconpath,dir,iconname))
  copy path.join(iconpath,dir,iconname) to path.join("res", dir, icon.png) // target is always
named icon.png  } }

So if the developer wants an launcher icon then he has to put an icon.png into e.g.

2014-03-19 18:21 GMT+01:00 AxelNennker <>:

> Github user AxelNennker commented on the pull request:
>     Re-implemented the "magic" for android. Typical sizes on Android 
> are recognized and used. A default icon is copied to all 
> res/drawable-*/ directories.
>     A simple way to get launcher icons without xml namespace juggling 
> or custom element in config.xml.
> ---
> If your project is set up for it, you can reply to this email and have 
> your reply appear on GitHub as well. If your project does not have 
> this feature enabled and wishes so, or if the feature is enabled but 
> not working, please contact infrastructure at 
> or file a JIRA ticket with INFRA.
> ---

View raw message