title: Avoid rotation animation during activity transition
body: <p>I have a camera preview activity in my Android app.  To avoid the messiness of dealing with screen rotations in a camera preview, I've simply told the activity to pick the default orientation for the device (portrait on phones, landscape on tablets):</p>
  
  <pre><code>&lt;activity android:name="CameraActivity"
      android:screenOrientation="nosensor"
      android:configChanges="keyboardHidden|orientation|screenSize"/&gt;
  </code></pre>
  
  <p>However, if I hold the device in a non-default orientation, there's an undesired rotation animation when entering and exiting this activity.  It's as if Android thinks the phone is being physically rotated to the default orientation, even though it's not!</p>
  
  <p>Is there any way to avoid this quirk?  I've tried creating a style with <code>&lt;item name="android:windowAnimationStyle"&gt;@null&lt;/item&gt;</code> or using <code>intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION)</code> as suggested <a href="https://stackoverflow.com/a/9312957/1397061">here</a>, to no avail.</p>