开发者

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

This question already has answers here: Closed 10 years ago.

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 开发者_如何学Cand 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));


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜