I want to allow the user to set a primary and a secondary colour in the app. What is the best way to do this. From what I read, I can define different themes and switch between them like
setTheme(myTheme.xml);
I would rather not have to do this at the start of every activity. Is there a way to somehow do this in the xml itself or what would be a best practice approach here?
Ideally I am looking for a 'global' approach, something that would work like making MyCurrentTheme in xml pointing to a variable that switches between theme1, theme_2, .... based on a user setting
<activity android:theme="@style/MyCurrentTheme">