title: Android: Detect Orientation Changed
body: <p>I need to detect an orientation change in my application, but I don't want my layout to be changed from portrait to landscape.
  Currently I'm using the <code>OrientationEventListener</code> however detecting the orientation angle is not enough. I want to detect that the user changed from portrait to landscape or viceversa, and that is not just detecting if the orientation angle is 90 or 270.<br><br>
  I want to do the same detection that the Android does to change the activity's orientantion. I tried overriding <code>onConfigurationChanged</code> and check if orientantion is landscape/portrait, however this still changes my activity layout to landscape.<br>
  <br>Is there a way to use onConfigurationChanged but force the layout to stay in portrait?<br> Is there another way to detect orientantion change without using <code>OrientationEventListener</code>. Ultimately I can implement my own orientation changed algorithm, any ideas on this? It has to be something more complex than <code>if(90-THRESHOLD &lt;= orientation &lt;= 90+THRESHOLD)</code>, I want to detect if the user made the complete movement Portrait->Landscape or Landscape->Portrait.</p>
  
  <p>Thanks for the help,<br>
  Filipe</p>