开发者

Two sets of resources for one application

开发者 https://www.devze.com 2023-03-26 10:53 出处:网络
I\'m developing an android application for a company that requires two different brandings for different client. I\'m coding with Eclipse, and I\'d like to know if it is possible to configure it to co

I'm developing an android application for a company that requires two different brandings for different client. I'm coding with Eclipse, and I'd like to know if it is possible to configure it to compile the application with each 开发者_StackOverflowres folder, hence giving 2 differents .apk files.

Thanks, Antoine


Have a look at Library projects. You can have the code of the app and default resources in a library project, referenced from two (or more) app projects. In each app project you can override the resources as needed.


In 1 project you can have multiple drawables, or layout folders. But they correspond to different properties about the device you are running on.(layout-land, drawable-hdpi-large etc) I don't think that is going to work for what you are trying to do though. To my knowledge you are stuck with the pre-existing folder types for resources, you cannot add your own. Easiest approach for you is probably going to be just create 2 projects and use one of the sets of resources in each.


I don't know if there's a way of doing it, but there's always a possibility of creating the copy of a project and changing the resources set. Would like to know if there's any other solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消