title: Get phone orientation but fix screen orientation to portrait
body: <p>I want to get the phone orientation but keep the screen orientation to portrait.
  So no matter the user turns the phone to landscape or portrait, the view stays the same, but I can get whether it is turned to landscape or portrait.</p>
  
  <p>Setting the activity to <em>android:screenOrientation="portrait"</em> will fix both but I wouldn't be able to detect the phone orientation via</p>
  
  <pre><code>public void onConfigurationChanged(Configuration newConfig) {
      switch (newConfig.orientation) {
      case Configuration.ORIENTATION_PORTRAIT:
          Toast.makeText(this, "Portrait", Toast.LENGTH_SHORT).show();
          break;
      case Configuration.ORIENTATION_LANDSCAPE:
          Toast.makeText(this, "Landscape", Toast.LENGTH_SHORT).show();
          break;
      default:
          break;
      }
  }
  </code></pre>
  
  <p>Has anyone an idea how to fix that?</p>