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: 
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.
The performance gain is typically so small that the cost to "understandable code" is higher than the speed benefit obtained.