I would like to give the user of my app the opportunity to change the colors of the app. He can decide between a standard colorful version (primary: blue, accent: orange) and a dark version (primary:dark grey, accent: light grey).
So in my res/values/colors.xml I would like to do it like this:
//Backup
<color name="version_default_primary">COLOR</color>
<color name="version_default_accent">COLOR</color>
<color name="version_dark_primary">COLOR</color>
<color name="version_dark_accent">COLOR</color>
When the user has chosen primary and accent color it should copy it into here:
<color name="primary">COLOR</color>
<color name="accent">COLOR</color>
How to do that? Because I dont want to save it in Sharedprefences and query every time: isDarkVersion() or isDefaultVersion() and so on...
EDIT: style.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyle</item>
</style>