Skip to content Skip to sidebar Skip to footer

Can I Update The String Message Of A Progressdialog?

I set up a progressdialog in an Android AsyncTak and it works. My question is it possible to update in the onProgressUpdate method of the AsyncTask the string that the ProgressDia

Solution 1:

Yes you can. Simply call myProgressDialog.setMessage("My New Message"); in onProgressUpdate method

Solution 2:

If you'll change message more then once:

@OverrideprotectedvoidonProgressUpdate(final String... values) {
        runOnUiThread(newRunnable() {
        @Overridepublicvoidrun() {
            progress.setMessage(values[0]);
                        }
            });
        }

Post a Comment for "Can I Update The String Message Of A Progressdialog?"