title: Screen rotation using Display.getRotation()
body: <p>I am trying to make it so my app never goes into portrait mode but is able to switch between the 2 landscape screen views. I know this can be done easily in Gingerbread (2.3) but I am having trouble doing it manually for the other versions of android, my code is as follows:</p>
  
  <pre><code>Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
          int orientation = display.getRotation();
          if (orientation == 1) {
              /* The device is rotated to the left. */
              Log.v("Left", "Rotated Left");
          } else if (orientation == 3) {
              /* The device is rotated to the right. */
          Log.v("Right", "Rotated Right");
          } else { 
  
          }
  </code></pre>
  
  <p>My problem is how do I flip the x and y-axis of the screen view depending on the rotation detected? How do I get hold of them in order to reverse them?</p>