Posted By

BenClayton on 03/05/11


Tagged


Versions (?)

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


 / Published in: Java
 

Add this to the AndroidManifest.xml definition of your activity

  1. android:configChanges="orientation|keyboardHidden"
  2.  
  3. e.g.
  4.  
  5. <activity android:name=".FooActivity"
  6. android:configChanges="orientation|keyboardHidden"
  7. >
  8. </activity>

Report this snippet  

You need to login to post a comment.