title: Change screen orientation in Android without reloading the activity
body: <p>I want to change the orientation programmatically while running my Android App, with these lines of code:</p>
  
  <pre><code>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);  
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
  </code></pre>
  
  <p>They work so far, but the main problem is that the whole activity is reloaded when the screen orientation changes, and I don't want that. Is it possible? Thanks.</p>
  
  <p><strong>EDIT: OK, after I while I found out what I was missing. I had to include also "screenSize" in the configChanges property, so having</strong></p>
  
  <pre><code>android:configChanges="orientation|screenSize"
  </code></pre>
  
  <p><strong>solved the whole thing.</strong></p>