title: android screen orientation: lock only parts of the layout
body: <p>I am building a camera app which makes use of the camera preview. In order to use the full screen for the preview, I locked the activity with </p>
  
  <pre><code>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  </code></pre>
  
  <p>Now I have following problem: whenever I render a form or I have to show a dialog, it always shows up in landscape mode, even when the user is using his/her device in portrait mode. 
  I tried to rotate edittext views by using transform animations, and they are correctly rotated, but still I am not able to focus them any more, and the keyboard always shows up in landscape too :(</p>
  
  <p>Do you know ANY way of finding a way round here?</p>
  
  <p><strong>IMPORTANT: detecting orientation is NOT the issue here. The question is: how do I rotate the forms/views/viewgroups and keyboard in a way that they are still usable.</strong></p>
  
  <p>I know that it has to be possible somehow: samsung's camera app (which comes with the galaxy S3) is able to rotate views without rotating the preview, so it has to be possible!
  see:</p>
  
  <p><a href="http://www.letsgomobile.org/images/reviews/0186/galaxy-s3-camera.jpg" rel="nofollow">http://www.letsgomobile.org/images/reviews/0186/galaxy-s3-camera.jpg</a></p>
  
  <p><a href="http://cdn2.mos.techradar.futurecdn.net//art/mobile_phones/Samsung/GalaxyS3/Galaxy%20Fire/Samsung_Galaxy_S3_25-580-100.JPG" rel="nofollow">http://cdn2.mos.techradar.futurecdn.net//art/mobile_phones/Samsung/GalaxyS3/Galaxy%20Fire/Samsung_Galaxy_S3_25-580-100.JPG</a></p>