android - How to change color in a theme? -


say have color defined in resources as:

<color name="primary_color">#f05b31</color> 

i use @color/primary_color in wide variety of styles , view definitions.

is possible programmatically change color value associated resource identifier primary_color @ run-time user-selected color?

alternatively, there other way of globally affecting primary colors of application? i'm aware can switch themes dynamically, allows selection predetermined set of themes, , i'm needing allow selection of arbitrary palette of colors.

i'm ok requiring activity/application restart change take effect.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -