Laur's blog
  • Home
  • About
  • Support my work
Sign in Subscribe

progressdialog

A collection of 2 posts
ProgressDialog in AsyncTask: Dynamic Update Text/Title
android

ProgressDialog in AsyncTask: Dynamic Update Text/Title

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
Jul 17, 2015 1 min read
ProgressDialog in AsyncTask: Dynamic Update max()
android

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: public class MyTask
Jul 16, 2015 1 min read
Page 1 of 1
Laur's blog © 2025
  • Sign up
Powered by Ghost