Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Progress dialog 0/100-how to remove that [duplicate]

Tags:

android

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 and 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));
like image 686
Kavitha Avatar asked Jan 19 '23 04:01

Kavitha


1 Answers

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

like image 149
citizen conn Avatar answered Jan 25 '23 23:01

citizen conn