Sunday, September 23, 2012

Re: [android-developers] using color.xml definitions in string.xml

Another option is to define the string resource as:
    <string name="my_string"><font fgcolor="#%h">STRING: </font></string>

Then, you can insert the colour using:
    String.format(getString(R.string.tasksnotify_format_colourful), getColor(R.color.my_color_defintion))


On Sunday, September 23, 2012 8:36:04 PM UTC-7, TreKing wrote:
On Fri, Sep 21, 2012 at 11:40 AM, Robert Greenwalt <rgree...@google.com> wrote:
Is there a syntax that allows me to reference a color defined in color.xml in my string.xml file?

I don't know, but consider using a style that you apply to whatever TextView or other View you're showing that text in.

--
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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate