I am developing an app in which i have create three activities
OnPause -> OnStop -> OnCreate -> OnResume -> OnRestart -> OnDestroy
OnResume -> onCreate -> OnRestart
when orientation changes again Oncreate is called. That is why your activity is not running correctly after the first time.
To fix this you have declare this in your Manifest file where the activity is declared:
For android 3.0 and above
When the app is in landscape and the phone is locked, then the app reorients to portrait and hence onCreate gets called again. To prevent this add the above line.