I have a library project, it contains all resources and class files, this project contains all theme related images, I am sharing my library project for creating new Projects, all works fine.
But when I want to change app theme related images, I need to update my library project images, but my library project already shared with some other projects so I don’t want to touch it.
There is one more way that I can add all new set of image in my New project but its increasing my project size and unnecessary I am shipping two sets on images.
Is there any way to share resource folder independently with project? so depends on requirement I can share my resource folder with respected project.
So it will be like this
Library Project
|
|__ class files
|
|__ resource folder(contais all drawables and layouts)
Can I choose a specific resource folder at compile time ?
Solution #1:
Versioned resources, downloaded in runtime from the web.
Consider to not embed any resources into your library project. This way you will be able to distribute it as .jar file, that will simplify integration for 3-rd party developers.
This way you will need to download resources in runtime from the web and cache them in /data folder or on SD card or in memory.
Solution #2:
Use ant or maven to build your project. This way you will be able to distribute your project with default configuration and with the possibility to build custom configuration.
This way resources can be located in any folder and will be taken from there during compilation, according to defined configuration parameter.