I already know that to stop being called OnCreate method on change of orientation in android.
and below is the code for that too.
<activity android:name=".MyActivity"
android:configChanges="orientation|keyboardHidden" />
But Its not working in my Google Nexus 5. Because it has the android kitkat os. Where as in Samsung Mega android 4.2 its working.
So what is the code for android kitkat to stop being call OnCreate()
on orientation change.
I also fixed orientation using below code
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" >
But that code is also not working.
(Edited) To fix orientation I need to add android:screenOrientation="portrait"
code in Activity tag. Thanks @RupaliG
Thanks