How to Override progress bar progress message i.e.. 61/100 to a custom message as 0 remaining out of 100 [duplicate]

断了今生、忘了曾经 提交于 2019-12-04 20:12:19
Sergey Glotov

ProgressDialog has method setProgressNumberFormat(). It's exactly what you need.

In your case:

progressDialog.setProgressNumberFormat("%1d remaining out of %2d");

Of course, it's better to define the string in resources.

Upd: This method available only in Android 3.0. As alternative you can implement your own ProgressDialog or just copy implementation from Android sources as mentioned in Progress unit in ProgressDialog.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!