Percentage appearnace while Progress

from the CommonsWare Community archives

At December 11, 2019, 10:00am, Pvr asked:

how to show Percentage of progress in 3 digits like 090% on progressbar Popup

At December 11, 2019, 12:17pm, mmurphy replied:

Put a TextView alongside your ProgressBar, and update the text at the same time that you update the progress.

At December 12, 2019, 3:42am, Pvr replied:

I did that way but to show progress value in 3 bits , i used format method . Is there any other way

At December 12, 2019, 12:14pm, mmurphy replied:

If by “in 3 bits” you mean “in 3 digits” (per your original question), AFAIK String.format() is your best approach. If these digits are part of a larger string that is a string resource, note that getString(int, Object[]) is available that combines retrieving the string resource and applying String.format() to it.