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
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
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:
3 matches
Mail list logo