Skip to content

Content Tagged "asynctask"

Page 1 of 1

ProgressDialog in AsyncTask: Dynamic Update Text/Title

July 17, 2015Category: Software
Sometimes, you may want to update the text shown in the progress dialog. If you try to perform this in doInBackground() you'll get an exception along the lines: Only the original thread that created a view hierarchy can touch its views The solution is to not do it in doInBackground() but instead…

ProgressDialog in AsyncTask: Dynamic Update max()

July 16, 2015Category: Software
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…

All tags