Sunday, August 1, 2010

Re: [android-developers] Using ? (question mark) and @ (at symbol) as values for a string resource

On 30 July 2010 14:11, Quintin Willison <qwillison@gmail.com> wrote:
> Trying to be a good boy here (all strings being declared in resource
> values) but have hit upon a non-critical but annoying issue...
>
> Example from res/values/strings.xml:
>
> <?xml version="1.0" encoding="utf-8"?>
> <resources>
>  <string name="ButtonLabel_QuestionMark">?</string>
>  <string name="ButtonLabel_AtSymbol">@</string>
> </resources>
>
> Eclipse / Android SDK will not take either of these lines. e.g.:
>
> "error: Error: No resource found that matches the given name (at
> 'ButtonLabel_QuestionMark' with value '?')."
>
> I think the problem is to do with 'referencing style attributes' as
> described here:
> http://developer.android.com/guide/topics/resources/accessing-resources.html
>
> And I cannot seem to find a way to escape these characters in my XML.
> I would have expected this to be documented here:
> http://developer.android.com/guide/topics/resources/string-resource.html
>
> Any ideas? Am I missing something obvious?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment