A Handler is associated with a Looper, not an activity.  Anyone can make a
Handler for the main thread, and post messages to it, and they will be
processed.  What happens to activities on that thread has no impact on
handlers.

Another way to look at it -- you don't pass an Activity to a Handler when
creating the Handler, so there is no association a Handler has with any
Activity.  (The Looper us implicitly known because there is a 1:1
relationship between a running thread and a Looper.  There is no such
relationship with an Activity.)

On Fri, Apr 30, 2010 at 1:01 PM, davidj <blahblah...@gmail.com> wrote:

> > use removeCallbacksAndMessages(null)
>
> Thanks. Where is this documented? There's no mention in the Handler
> documentation about passing a null Object to this method.
>
> --
> 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<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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