Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

How do I remove the encircled on the picture?

enter image description here

Thanks a lot for any help! :)

like image 456
Emkey Avatar asked Oct 17 '11 12:10

Emkey


People also ask

How do I get rid of progress bar?

Here's how: Go to Style > Layout > Layout Options. Uncheck the option to Show Progress Bar and click Apply Changes. That's it!

How do I make a custom progress bar?

Customizing a ProgressBar requires defining the attribute or properties for the background and progress of your progress bar. You can do this in the XML file or in the Activity (at run time). Why is it necessary to set the progress drawable at runtime, when it is possible to do it on the xml file?

What are the different types of progress bars?

There are 2 types of progress bars: determinate and indeterminate. The former is used when the amount of information that needs to be loaded is detectable. The latter is used when the system is unsure how much needs to be loaded or how long it will take.

How does a progress bar work?

A progress bar is a graphical control element used to visualize the progression of an extended computer operation, such as a download, file transfer, or installation. Sometimes, the graphic is accompanied by a textual representation of the progress in a percent format.


2 Answers

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

like image 62
CommonsWare Avatar answered Sep 28 '22 04:09

CommonsWare


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);
    }
}
like image 29
Szabolcs Becze Avatar answered Sep 28 '22 05:09

Szabolcs Becze