onDraw() isn't called before onResume(); the window isn't generally
displayed until after onResume() returns, at which point the view hierarchy
(not the activity) will take care of having it drawn as needed.  This is
what we want so that the activity can do all of its setup for being resumed
before it is drawn.

On Thu, Apr 16, 2009 at 10:00 PM, Lucius Fox <[email protected]> wrote:

>
> Hi,
>
> I read http://developer.android.com/guide/topics/fundamentals.html#lcycles
>
> which said "The foreground lifetime of an activity happens between a
> call to onResume() until a corresponding call to onPause(). During
> this time, the activity is in front of all other activities on screen
> and is interacting with the user. "
>
> But when I look at  handleLaunchActivity of ActivityThread.
> It first calls  performLaunchActivity() and then call
> handleResumeActivity().
> But I look at the performLaunchActivity() implementation, it does not
> calls Activity's onDraw() method. So how can android makes sure the
> Activity's onDraw() at least once before it calls the Activity's
> onResume()?
>
> In other words, how can the implementation of  handleLaunchActivity of
> ActivityThread make sure this "The foreground lifetime of an activity
> happens between a call to onResume() until a corresponding call to
> onPause(). During this time, the activity is in front of all other
> activities on screen and is interacting with the user. " is true?
>
> Thank you.
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

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