cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karen Tran <>
Subject Re: [Proposal - New Feature] Add tag to config.xml to handle images
Date Fri, 01 May 2015 18:13:45 GMT
I am looking for a way to be able to specify an image in the config.xml and
have it be placed in the drawable directory. Under my circumstances, I have
to assume that when the user creates a cordova project, he/she only knows
how to modify the config.xml, so that's why I'm pushing for a way to do it
this way.

I do have a hackish way of doing it by using the preferences tag and
getting the path to the image, and then having a script copy it over, but I
know the better way to do it would be to just make a tag to take care of
images that are not going to be the main icon or splash image and have
cordova-cli handle it for me when I call cordova prepare.

This isn't really for a plugin, though maybe an app template, but I just
wanted to add this functionality to be able to specify non-icon and
non-splash images through the config.xml.

I've found where in cordova-lib that the parsing happens for the icon and
splash tags, so I was proposing to add a new tag for "general images". The
images could be anything that a user might want in his or her app. An
example would be a customized button. The user can specify the path to the
image file, and then the image will be dropped into the drawable directory.

On Fri, May 1, 2015 at 12:27 PM, Jesse <> wrote:

> What is the use for the images? Is this for a plugin, or an app template?
> I can think of a couple ways to do this, but none would affect
> configure.xml.
> I suggest you look at how the splash screen plugin does this for android.
> > On May 1, 2015, at 8:39 AM, Karen Tran <> wrote:
> >
> > Hi dev-list,
> >
> > I wanted to get your input on a feature I want to add to the config.xml.
> >
> > Currently there are only the icon tag and splash tag that allows the user
> > to specify the icon and splash image in the config.xml respectively.
> >
> > I want to be able to specify multiple images that will be used in my app
> > such as customized buttons. The problem is that the icon tag will rename
> > the image specified to icon.png, so ultimately the user would only be
> able
> > to change the main icon. And the splash tag of course handles the splash
> > image, so I don't want that.
> >
> > I propose making a new tag that handles general images. It'll be similar
> to
> > the icon tag, except it won't rename the image. It will copy the image
> from
> > the src, and drop it into the correct drawable-density directory (I am
> > working in android).
> >
> > I know I can just drop the images myself into the drawable folders, but I
> > have to assume that my users won't know the android project structure and
> > will only modify the config.xml.
> >
> > Any thoughts, comments, or critiques would be appreciated.
> >
> >
> > Regards,
> > Karen Tran
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message