Thanks that works great. I feel kind of stupid for not figuring that
out on my own now.  I do think it's silly for onCreate to be called
again on rotate; there should be an onOrientationChange event or
something.

Kirk

On Apr 13, 11:31 am, MrChaz <[email protected]> wrote:
> 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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to