I would like to create themes for my App - And by that what I want is that the user would be able to go to the app settings page and choose a different color scheme.
What I've done so far is to create my color "theme" as an object in alloy.js like this:
Alloy.Globals.Theme = {
WindowBackground: "#fafafa",
FontColor: "#383838",
ListItemSelectedColor: "#4ccedc",
.
.
.
};
And where I use colors in my TSS point to this object (which I will populate with the currect colors in runtime).
I have the feeling that this is not the best practice to go with.
And for this to actually change themes, the user would have to close and reopen the app. I've seen many apps where the user just selects the theme and the screen (and all screens that were before that one) immidiatly change the colors acourdingly.
What is the best practice to achive this? I was thinking something in the direction of a theme model but really not sure how to go about it.