title: Lock screen orientation (Android)
body: <p>I'm writing an android application that uses tabs with different contents (activities).
  In one of these activities, I would like to lock the screen orientation to "Landscape"-mode,
  but in the other activities, I want the normal orientation (according to sensor).</p>
  
  <p>What I'm doing now is that I'm calling </p>
  
  <pre><code>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  </code></pre>
  
  <p>when I switch to the landscape mode activity, and </p>
  
  <pre><code>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
  </code></pre>
  
  <p>when I switch back to the other activities. However, this doesn't seem to work,
  the whole application locks up. What is the normal approach to this problem?</p>