开发者

Changing Progress Dialog Message While Running

开发者 https://www.devze.com 2023-02-25 00:56 出处:网络
I\'ve got a fairly simple issue I\'m not sure how to resolve. I want to change the message text of a Progress Dialog while it\'s running and showing. An example of this would be something like a \"tim

I've got a fairly simple issue I'm not sure how to resolve. I want to change the message text of a Progress Dialog while it's running and showing. An example of this would be something like a "time remaining" counter that would count down while the progress animation is spinning. I'm not sure how I would approach this because doing prog开发者_JAVA百科ressDialog.setMessage(String), even within a running thread, will not change anything in the Dialog itself. Thank you!


You might want to check this question out.

In short: You need to create a little Runnable which you can execute on the UI thread using runOnUiThread...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号