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

前端 未结 3 1257
名媛妹妹
名媛妹妹 2021-01-17 11:51

How do I remove the encircled on the picture?

\"enter

Thanks a lot for any hel

相关标签:
3条回答
  • 2021-01-17 12:32

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

    0 讨论(0)
  • 2021-01-17 12:34

    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();
    
    0 讨论(0)
  • 2021-01-17 12:41

    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);
        }
    }
    
    0 讨论(0)
提交回复
热议问题