> A configuration change as described in:
>
> http://code.google.com/android/reference/android/app/Activity.html#ConfigurationChanges
>
> "Unless you specify otherwise, a configuration change (such as a
> change in screen orientation, language, input devices, etc) will cause
> your current activity to be destroyed, going through the normal
> activity lifecycle process of onPause(), onStop(), and onDestroy() as
> appropriate. If the activity had been in the foreground or visible to
> the user, once onDestroy() is called in that instance then a new
> instance of the activity will be created, with whatever
> savedInstanceState the previous instance had generated from
> onSaveInstanceState(Bundle)."
>
> I actually don't care about configuration changes but I would like to
> be able to restart my activity from the activity itself and that it
> will go through the same lifecycle as described above.

Well...

-- finish() won't restart the activity; it just shuts it down, and you'd
need to manually launch it again, or rig up something that could fire a
delayed Intent to restart it

-- finish() may not provide the instance state bundle to onCreate() on the
next startup, as I haven't tested that scenario

What are you trying to achieve by the restart?

--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!



--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to