I have a simple app that has three windows, each with a corresponding
activity.  It's very common to switch back and forth between activities,
but of course state gets wiped out of the top-most activity when the
user has finished with it, and I want that state to persist.  So I have
two questions:

1.  Currently, I'm persisting the state by saving it to the MODE_PRIVATE
SharedPreferences in onStop(), then restoring it in onCreate().
Is this acceptable, or is there a better way to handle it?

2.  If it is acceptable, a side effect is that the state now persists
between app invocations.  Personally I like this, but I haven't
seen any guidelines for Android on whether minor settings
should persist past the life of the app.  Is this a good practice
for Android or not?

thanks,
eric

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to