On Fri, Sep 23, 2011 at 10:25 AM, Bluemercury <[email protected]> wrote: > IS there a way to avoid the static references to the views, but at the same > time giving the possibility of the tasks to change the visibility of the > progressbar even if the current activity visible is not the one who laucnhed > the task initially?
The activities cannot share a progress bar, period. They each have their own progress bar. When you switch between activities, put the progress value (e.g., getProgress()) in an extra, so the new activity can set its progress bar to match. When you handle rotation events, pass the progress value via onSaveInstanceState(), or possibly as part of the state you pass (along with your AsyncTask) in onRetainNonConfigurationInstance(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

