Android: Prevent onCreate being called when the orientation of the screen changes

/ Published in: Java
Save to your folder(s)

Add this to the AndroidManifest.xml definition of your activity

Copy this code and paste it in your HTML
  1. android:configChanges="orientation|keyboardHidden"
  3. e.g.
  5. <activity android:name=".FooActivity"
  6. android:configChanges="orientation|keyboardHidden"
  7. >
  8. </activity>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.