For completeness it is worth noting that there are many more approaches to maintaining state. Later you will need to discover how to store lots of user data locally for longer term persistence and this is often enough to implement state management though a configuration change.
You can also opt to retain an object of your choosing using the onRetainNonConfigurationInstance(). All you have to do is override this function so that it returns the object you want to keep. The system will then store this object for you and return it to you when you ask for it using getLastNonConfigurationInstance() which returns the object that was last saved by the system.
The object can be as complex as you like but don't try to save a system object such as an Activity or a View. This just results in memory leaks.
The ultimate in making sure that things happen as you want it to handle the configuration change yourself.
You can do this by making a change to the manifest. If you do this then it is up to you to make the changes needed when the onConfigurationChanged even occurs. You could for example opt to animate buttons and other UI objects into new positions or just ignore the need to reconfigure altogether.