How to remove progress bar number at the bottom part of the progress bar?
Asked Answered
F

3

12

How do I remove the encircled on the picture?

enter image description here

Thanks a lot for any help! :)

Feces answered 17/10, 2011 at 12:51 Comment(1)
You would have to make your own progress bar.Fuld
N
21

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

Nag answered 17/10, 2011 at 15:1 Comment(5)
Thanks for your response @CommonsWare, too bad I'm using API 8. Do you know any workaround?Feces
@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.Nag
@CommonsWare: This is correct. The progress number AND percentage will also be displayed in prior API levels. Iam also searching for a workaroundHymettus
@Nag 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.Bryon
@Nag Here is my question #14102062 if you can guide me than it would be great. Thanks...Bryon
I
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);
    }
}
Interplanetary answered 17/2, 2016 at 9:50 Comment(0)
Y
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();
Yazzie answered 9/4, 2014 at 15:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.