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
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 its
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
onConfigurationChanged()
method is called.
Aucun commentaire:
Enregistrer un commentaire