Having this attrs.xml file:
<resources>
<attr name="customColorPrimary" format="color" value="#111111"/>
</resources>
It is possible to write with java code a new value for that color?
Can't find how to do it in the official documentation...
Having this attrs.xml file:
<resources>
<attr name="customColorPrimary" format="color" value="#111111"/>
</resources>
It is possible to write with java code a new value for that color?
Can't find how to do it in the official documentation...
Short answer: No.
Long answer: All resources you use in your code are compiled as contents of R class. Every single resource (including string, dimen, layout, style, attr and other) is compiled as some variation of public staticfinalint values. That's why you can't modify it during runtime.