I have a project in Android Studio that uses different flavors for different colors (some other things as well, but they don't matter).
What I would like is to see how a certain UI element (all defined by xml files) looks with non-default flavor?
Let's say I have to flavors, flavor A which is default and flavor B which is not. Lets say flavor A main color is red, and flavor B main color is green.
When I open layouts, they will always show as red, no matter what flavor in build variants is selected.
I'm sure there is a way to do this, but I don't know how.
Edit1: Seems I didn't explain it (thought it was implicit). My resource files for flavors are already in different folders. Colors in resource files are of the same name. That is not the problem, the problem is that I can't see colors in layouts inside of Android Studio.
Colors are in separate folders and it works as it should. When I build and install flavors, they use their colors. But when I open a layout, it always shows with default colors in Android Studio
from Show Layouts in Android Studio depending on Flavor
No comments:
Post a Comment