In my case I need to be able apply a color conditionally (for example
based if an item is read or unread) so I need to be able to read the
"read" and "unread" colors from the current theme and apply them
appropriately.

I gave the color special attribute name in my \attr xml file and
assigned it different values in 2 different themes.
if I do getResources().getColorStateList( <my attribute resource ID>)
it fails because it can't find the resource. It seems like something
needs to first resolve the attribute Id to the Id of the resource in
the current theme, but I am not sure what does that.

Stefan

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

Reply via email to