Handle orientation changes automatically

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).

ref : https://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChange
Author: bm on June 1, 2016
Category: Android