I think his use of the main Looper is OK -- though not something I
would endorse, in part, because:
I think the problem is in the lifetime of his handlers.
Yidongsoft:
Normally, you allocate the Handler in your main thread -- and then
HANG ONTO THEM, generally in an instance field of your
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
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
3 matches
Mail list logo