Q: Change layout orientation on run time I have 2 layouts one for portrait and other for landscape, if I enter in portrait mode the portrait layout is called, and if I enter in landscape mode the landscape mode layout is called. However; if I enter in portrait mode and rotate the screen to landscape the landscape layout is not called the phone rotates the portrait layout resulting a strange layout (same if I rotate it when using landscape).
So how to make the application call the right layout when i rotate the phone upon run time.
Thanks,

A: Probably you have android:configChanges="orientation" set for you Activity in your AndroidManifest.xml, which means you'll have to handle orientation changes yourself in Activity.onConfigurationChanged. Remove android:configChanges from the manifest and the activity will be recreated on orientation change and you code should start working.
