Gack. I see I said that. Thanks for correcting it. I think what was going through my mind was that the handler purpose would likely be updating the activity's view, and that idea got short- circuited between forebrain and fingers.
Thanks for the catch. On Feb 20, 6:27 pm, Mark Murphy <[email protected]> wrote: > Bob Kerns wrote: > > * Create your Handler in the context of whatever you want to associate > > with handling it. For example, if you're updating a view in an > > activity, create it in the onCreate() method for the view. > > * Save your handler in an instance variable in that context. In other > > words, the Handler is owned by the context in which it runs, not the > > context in which messages are posted. > > * When you run some code in some other context that wants to post back > > -- pass it the Handler, so it can do so. (Often this will be from code > > from the same class -- you can just refer to the instance variable). > > Excellent advice! > > (though, a nit: in your first bullet, perhaps you mean onCreate() for > the activity, since there is no onCreate() for View) > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Training in US: 14-18 June 2010:http://bignerdranch.com -- 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

