Possible Duplicate:
Progress unit in ProgressDialog
How to Ove开发者_开发百科rride progress bar progress message i.e.. 61/100 to a custom message as 10 remaining out of 100
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.
精彩评论