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

2012-09-23 Thread TreKing
On Fri, Sep 21, 2012 at 11:40 AM, Robert Greenwalt rgreenw...@google.comwrote: 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

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

2012-09-23 Thread UgglyNoodle
Another option is to define the string resource as: string name=my_stringfont fgcolor=#%hSTRING: /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

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

2012-09-21 Thread Robert Greenwalt
Is there a syntax that allows me to reference a color defined in color.xml in my string.xml file? I can do: string name=my_stringfont fgcolor=#ff90STRING: /font/string but hardcoding is bad. I'd really like to do: string name=my_stringfont fgcolor=@color/my_color_defintionSTRING: