I find the flowchart of Activity lifecycle pretty ambiguous.  In a
perfect world, it would receive a little more work to resolve the
gray, but I'll throw out some example issues.

1.  The phrasing on the legs into and out of onPause() are vague.
Does "another activity comes in front of the activity" pertain to the
case where my activity is simply going away because finish() was
called?  Does "the activity is no longer visible" mean that my
activity is entirely concealed, and would this then differ from the
case where another activity appeared partially in front of my own?

2.  what happens if you call finish() from within onCreate()?
onStart()?  just about anywhere except the green "activity is running"
blob?

3.  How is onPause() -> onResume() different than onStop() ->
onRestart()?  What circumstances differentiate the flow?

4.  minor nits:  the clarity of the chart is actually diminished by
having an exit from the "The process is killed" state, and some
mention as to whether the Activity object may be re-used should follow
the onDestroy() state

The thing I am specifically trying to do is this:

I want to perform certain actions when the BACK or HOME keys are
pressed, and ignore cases where a third-party activity simply pops up
on part of the screen and then goes away.  Not all phones are
traversing the lifecycle graph the same way, it seems, and since I do
not have one of every phone (Droids seem notoriously different),
writing test cases is not a viable means of educating myself.  I'd
like some clarity on the designed behavior that can be vouched for.

tone

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