Take at look at on onSaveInstanceState() You can use that to save things into the bundle that is passed to onCreate()
On Apr 13, 7:26 pm, Kirk <kirk.mora...@gmail.com> wrote: > I have an activity that responds to the accelerometer. When the device > is rotated, a different layout is displayed based on whether the phone > is portrait or landscape. I notice, however, that each time the phone > is rotated, the onCreate method is called and all of my instance > variables are reset. Is there any way to make the values of these > variables persists? > > Thanks, > > Kirk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---