Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a commercial Android project that I have created a client-specific version for (mainly UI tweaks). Since the bulk of the tweaks are in the res/ folder in XML files, we have the changes currently in a branch but I really don't want to have to port changes back and forth between branches in perpetuity. I'm curious if anyone has any source control strategies that will make managing multiple client-specific versions of an Android application as painless as possible.

Also, not sure if this belongs here or StackOverflow. Feel free to transition over there if I guessed wrong.

share|improve this question
If you were using Mercurial, I'd suggest Mercurial Queues, so maybe would be of some help. – Mark Booth Jul 5 '11 at 16:07
Have you checked out submodules? That might help. – Nic Aug 5 '11 at 22:56

Have you consider apply a style of programming called FeatureToggle?

The basic idea is to have a configuration file that defines a bunch of toggles for various features you have pending. The running application then uses these toggles in order to decide whether or not to show the new feature.

While is hard, we usually use this style when it´s hard to use branches.

More about this by Martin Fowler.

share|improve this answer

The path we are going down is we are avoiding custom code as much as possible, and the app resources (everything in the res/ subdirectory) are stored in a separate git project with its own branches. That way we can decouple feature branches from UI branches and test features with different UI's without having to do the gymnastics from before where the UI was tied with the code on a per-branch basis, if that makes sense.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.