12

How do I remove the encircled on the picture?

enter image description here

Thanks a lot for any help! :)

Emkey
  • 5,346
  • 8
  • 38
  • 55

3 Answers3

21

Pass null to setProgressNumberFormat() and setProgressPercentFormat() when you create your ProgressDialog. Note that this is only available on API Level 11 and higher.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks for your response @CommonsWare, too bad I'm using API 8. Do you know any workaround? – Emkey Oct 18 '11 at 01:36
  • @Emkey: Change to use API Level 11, or use reflection to call those methods. AFAIK, the progress number and percentage do not exist on prior versions of Android. Or, do not use `ProgressDialog`. – CommonsWare Oct 18 '11 at 10:58
  • @CommonsWare: This is correct. The progress number AND percentage will also be displayed in prior API levels. Iam also searching for a workaround – 0xPixelfrost Jul 26 '12 at 12:34
  • @CommonsWare How can i show progress with KB/MB downloaded. I would like to show the progress same as when we download the app from the Play store. – Scorpion Jan 04 '13 at 15:30
  • @CommonsWare Here is my question http://stackoverflow.com/questions/14101562/how-to-show-kb-mb-as-progress-in-android-using-progressdialog# if you can guide me than it would be great. Thanks... – Scorpion Jan 04 '13 at 15:30
1

I needed a similar functionality -> to hide the percenatge and min/max when the progressDialog is in indeterminate state.

private void setIndeterminate(boolean isIndeterminate) {
    progressDialog.setIndeterminate(isIndeterminate);
    if (isIndeterminate) {
        progressDialog.setProgressNumberFormat(null);
        progressDialog.setProgressPercentFormat(null);
    } else {
        progressDialog.setProgressNumberFormat("%1d/%2d");
        NumberFormat percentInstance = NumberFormat.getPercentInstance();
        percentInstance.setMaximumFractionDigits(0);
        progressDialog.setProgressPercentFormat(percentInstance);
    }
}
Szabolcs Becze
  • 507
  • 1
  • 5
  • 10
0

If you want to disable the above number status from progress dialogue, then you should remove this code.

progress1.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);

Here i will show you that how to create progress bar which will not show any status

progress1.setMessage("Fetching Files...! ");
progress1.setIndeterminate(true);             
 progress1.show();
Pir Fahim Shah
  • 10,505
  • 1
  • 82
  • 81