ANDROID - How to apply a different theme to a product flavour?

442 Views Asked by At

I'm not very familiar with working with product flavours and applying different themes to them.

Basically I'm working on an app that is going to have a reskin to a different set of colours/themes. The codebase should be the same, just the theme/logo is different between them.

What's the best way to go around this?

Is it recommended to just have different source sets for each flavour? Eg. android/main/src will contain default color/styles and android/chocolate/src will have specific color/styles for the chocolate flavour?

1

There are 1 best solutions below

0
Abdullah Z Khan On

It's src/flavor{main}, but yes. Ideally, the styles.xml file would only be on main, but color/drawables and values/strings.xml will be different across source sets with the same identifiers.