You need to write your app correctly to save/restore its state with onSaveInstanceState(). onRetainNonConfigurationInstance() is purely for optimization.
This is simple Android SDK development; please look on android-developers for help. There are already lots of discussions there on this topic that you can read. On Tue, Jun 16, 2009 at 6:08 AM, Yi Sun <beyo...@gmail.com> wrote: > > When the rotation happens, your activity will be restarted. If you want > to keep some status across the rotation, then you need to do it by u > self. > One way to do it, is by using onRetainNonConfigurationInstance method. > There are many doc about this on internet. a google will help. > On Tue, 2009-06-16 at 05:36 -0700, zhangxiyuan wrote: > > Hi, > > > > I have posted this topic in the android-platform group, I do not know > > whether it is right or not to post it here. > > If not, just forget about it. > > Sorry. > > > > I have read the topic about "Controlling the Emulator" at > > developer.android.com. > > I can change my emulator's orientation by pressing CTRL+F11 or CTRL > > +F12. > > > > But what I really want to know is what this influence/affect my > > application. > > For example, I got an Activity with two screen. (main screen and > > settings screen) > > I am using a FrameLayout. > > When I press a button on the main screen, it rotates to the settings > > screen. > > then, If I press CTRL+F11, THEN it backs to the main screen. > > by debugging the application, I found that the activity's onCreate was > > invoked again, which means the activity was rebuilt. > > You know, I do not want this to happen. > > I want to change the orientation ,and keep the settings screen on > > foreground. > > How should I implement this? > > > > Thanks so much. > > > > > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---