Yeah add-resource is just to tell aapt that it is okay for this to be
introduced as a new resource even though it doens't already exist.

On Thu, Feb 18, 2010 at 5:49 AM, cneth <[email protected]> wrote:

> I believe the <add-resource> is used _only_ to introduce the new
> resource; you can't simultaneously declare it also.
>
> I.e. you need to do this:
>
> <add-resource type="string" name="foo"></add-resource>
> <string name="foo">Hello</string>
>
> From what I can see, aapt throws away everything but the name and type
> attributes in the <add-resource> tag.
> This makes sense because otherwise the <add-resource> tag would need
> to be able to describe every other possible resource.
>
> Craig
>
> On Jan 23, 8:47 pm, Dianne Hackborn <[email protected]> wrote:
> > Yeah looks fine.  I think currently the only information about this is in
> > the aapt source.
> >
> >
> >
> > On Sat, Jan 23, 2010 at 8:14 AM, dnak <[email protected]>
> wrote:
> > > Thank you for your reply.
> >
> > > I want to know how to use <add-resource>, but I didn't find the
> > > information about <add-resource>.
> > > So, I read aapt's source, and I guessed how to use <add-resource>
> > > .
> > > I wrote below code to string.xml.
> >
> > > <add-resource type="string" name="foo">Hello World</add-resource>
> >
> > > Building string.xml was procceeded.
> > > Is is correctly?
> >
> > > By the way, where is the information about resource xml tag (e.g. <add-
> > > resource>)?
> > > I don't want to read aapt's source further, whenever an error
> > > happening.
> >
> > > Regards.
> >
> > > --
> > > unsubscribe: 
> > > [email protected]<android-porting%[email protected]>
> <android-porting%[email protected]<android-porting%[email protected]>
> >
> > > website:http://groups.google.com/group/android-porting
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> unsubscribe: 
> [email protected]<android-porting%[email protected]>
> website: http://groups.google.com/group/android-porting
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to