我可以更新ProgressDialog的字符串消息吗? [英] Can I Update the string message of a ProgressDialog?

查看:69
本文介绍了我可以更新ProgressDialog的字符串消息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android AsyncTak中设置了一个ProgressDialog,它可以正常工作.

I set up a progressdialog in an Android AsyncTak and it works.

我的问题是,是否可以在AsyncTask的onProgressUpdate方法中更新ProgressDialog显示的字符串.我想用publishProgress调用更新字符串以显示任务的进度.

My question is it possible to update in the onProgressUpdate method of the AsyncTask the string that the ProgressDialog displays. I would like to update the string with a publishProgress call to show progress of the task.

如果我有自己的文本视图而不是progressDialog,则可以更新字符串.progressDialog看起来更好,并且具有旋转轮.

I can update the string if instead of the progressDialog I have my own textview. The progressDialog looks better and has the spinning wheel.

推荐答案

可以.只需在 onProgressUpdate 方法

这篇关于我可以更新ProgressDialog的字符串消息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆