Question: I want to change the background color for layouts dynamically for the first time only, using configuration file in android that file should be in assets folder,it can be xml file or anything.
please help me.

Answer: 
**Using a tmp variable is both faster *and* more readable with modern compilers and CPUs**. 2x loads into registers, then 2x stores back into the original locations.

Or if one or both variables were already in registers, the compiler might completely optimize anyway the temporary. If xor-swapping was faster on some hypothetical machine, a good compiler would use it for you when optimizing `tmp = a; a = b; b = tmp;` So you don't need to write it explicitly. This is why you're using C, not writing by hand in asm.

Also, xor-swap works for integers only. What if you want to swap floating-point numbers? Strings? Custom objects? etc.
1. While there is no explicit temporary variable, the results are actually stored in an implicit temp variable before being written to the register.
2. With xor swap, you need to ensure that the variables being swapped aren't same. Else both shall be evaluated to 0.