In my Android application, when I rotate the device (slide out the keyboard) then my Activity
is restarted (onCreate
is called). Now, this is proba
onConfigurationChanged is called when the screen rotates. (onCreate is no longer called when screen rotates due to manifest, see: android:configChanges)
What part of the manifest tells it "don't call onCreate()
"?
Also,
Google's docs say to avoid using android:configChanges
(except as a last resort).... But then the alternate methods they suggest all DO use android:configChanges
.
It has been my experience that the emulator ALWAYS calls onCreate()
upon rotation.
But the 1-2 devices that I run the same code on... do not.
(Not sure why there would be any difference.)