Ok ProgressBarThread is already a static inner class, so what you're telling
is to change the instance reference to static too:

private ProgressBarThread task=null;  to

private static ProgressBarThread task=null;

But now how i tell the task initiated by activity A to attach to the current
Activity???And how does rotation affects this?

regards,


On Fri, Sep 23, 2011 at 4:40 PM, Streets Of Boston
<[email protected]>wrote:

> Don't hold static references to Activities or Views. You will run into
> memory issues and such.
> But you could put your instance of ProgressBarThread  into a static
> reference that is accessible by Activity B.
> Then Activity B can register/attach and de-register/detach to this
> background task as well during its lifecycle.
> This would allow the ProgressBarThread to update both activities A and B.
>
>  --
> 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
>

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