Detect if an activity restarted because of an orientation change
<p>How can I detect if the user changed the device orientation so I don't run the same initialization code every time the activity is recreated? Or how can I restore my activity state (including variables values)?</p>

<p>Thanks</p>
