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
The way I have found to do this is use the onRestoreInstanceState
and the onSaveInstanceState
events to save something in the Bundle
(even if you dont need any variables saved, just put something in there so the Bundle
isn't empty). Then, on the onCreate
method, check to see if the Bundle
is empty, and if it is, then do the initialization, if not, then do it.