Рассмотрим это:
styles.xml
<style name="BlueTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="theme_color">@color/theme_color_blue</item>
</style>
attrs.xml
<attr name="theme_color" format="reference" />
color.xml
<color name="theme_color_blue">#ff0071d3</color>
Значок темы ссылается на тему. Как я могу получить theme_color (reference) программно? Обычно я использовал бы getResources().getColor()
, но не в этом случае, потому что он ссылался!