Set android:configChanges=”orientation|screenSize” to the Activity property in Android manifest
eg:
However, if your application targets API level 12 or lower, then your activity always handles this configuration change itself (this configuration change does not restart your activity, even when running on an Android 3.2 or higher device).