ProgressDialog in AsyncTask: Dynamic Update max()

Sometimes you determine the max of the progress bar in the background task. Unfortunately, there’s almost no way to transmit that to an UI thread-executed method like onProgressUpdate() (well, you could, but that’d be abusing the method). Instead you can do something like:

This way, the variables are updated in their own thread and the progress is advanced with a percentage.


A little experiment: If you find this post and ad below useful, please check the ad out :-)




One thought on “ProgressDialog in AsyncTask: Dynamic Update max()

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top