title: How is application orientation (landscape or portrait) locked?
body: <p>I have tried to freeze orientation using:</p>
  
  <pre><code>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  </code></pre>
  
  <p>Although the display stays in portrait orientation, the activity is still recreated. Any ideas how to solve this?</p>
  
  <p>How can the orientation of the application be locked such that the activity is not recreated on orientation change?</p>