views:

64

answers:

1

I have some resources in my app that are going to be loaded optionally for different brands. I don't want to set up entirely different projects each time we re-brand the app so I want to know if the resources that are not used will be always packaged in and if there is a way to avoid this. Here's an example:

MyProject
/res
    /layout
        main.xml (used in all apps)
        productlist1.xml (used in app ABC.apk)
        productlist2.xml (used in app XYZ.apk)

main.xml should be packaged in both ABC and XYZ apps

productlist1.xml should be packaged with app ABC but not with app XYZ

productlist2.xml should be packaged with app XYZ but not with app ABC

+1  A: 

I want to know if the resources that are not used will be always packaged in

Yes.

and if there is a way to avoid this

Use library projects. Or, create custom Ant tasks that filter the resources that get packaged in any given version of the app.

CommonsWare