Rotating a phone is a fairly complex matter in Android.
Everything that Dave stated is true interms of resources and is probably the cause of layout discrepancy.
However one also needs to worry about the fact that Android closes and restarts the activity. Mind you that the process is not restarted but just the Activity instance.
So you need to use the save/restore instance methods to save your transient data and reestablish it. This happens not only for rotation of the device but any device configuration change such as connecting to a usb port or connecting an external monitor etc.
See if the following URL is use ful
Understand Android Configuration Changes