lundi 27 janvier 2014

android activity restart after screen when the screen orientation change

you need to add
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|touchscreen">
to your android manifest
as explained in android forum :
http://developer.android.com/guide/topics/manifest/activity-element.html




android:configChanges
Lists configuration changes that the activity will handle itself. When a configuration change occurs at runtime, the activity is shut down and restarted by default, but declaring a configuration with this attribute will prevent the activity from being restarted. Instead, the activity remains running and itsonConfigurationChanged() method is called.

Aucun commentaire:

Enregistrer un commentaire

Nombre total de pages vues