Android supports two screen orientations: portrait and landscape.
By default, when you change the display orientation of your Android device, the current activity that is displayed automatically redraws its content in the new orientation.
onCreate()
method of the activity is fired
whenever there is a change in display orientation.
When you change the orientation of your Android device, your current activity is actually destroyed and then recreated.
In general, you can employ two techniques to handle changes in screen orientation: