I've wondered time and time again if there is some way to define colors in colors.xml by referencing another color that has been defined. Well, I tried it and indeed, it appears as though you can reference other colors using @color/XXX.
For example one's colors.xml could look like:
<?xml version="1.0" encoding="utf-8"?> <resources> … <color name="primary_blue">#205081</color> <color name="action_bar_text">@color/primary_blue</color> … </resources> But I don't want others to use my primary_blue definition directly -- it doesn't make sense to make something blue without context. The best solution I've come up with is to prefix 'direct' colors like primary_blue and then comment that they shouldn't be used directly.
Is there any way to prevent the use of these direct colors, while still allowing my colors.xml file to reference them? I'm thinking perhaps styles or an apklib could help me out.