Android Progress dialog 0/100-how to remove that [duplicate]
Possible Duplicate:
How to remove the text in progressBar in Android?
I have basic issue, I have used default progress dialog and everything works fine. Below the progress bar I have 0% displayed 开发者_如何学Cand 0/100 shown but some how they are at the same end next to each other. How do I change this, I just need one of them for starters. I know I can go in for custom dialog, but for this minor change I did not want to opt for custom dialog. Is there any way to do this or is custom is the only way ?
operationInProgressDialog = new ProgressDialog(StartOpScreen.this);
operationInProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
operationInProgressDialog.setMessage(getString(R.string.operation_in_progressdialog));
If you are using API level < 11 then custom is the only way. Starting with API level 11 you can call:
setProgressNumberFormat() // or
setProgressPercentFormat()
To change the way these fields are displayed. Including hiding them altogether.
The docs always help: http://developer.android.com/reference/android/app/ProgressDialog.html
精彩评论