开发者

Android Horizontal progress bar

The horizontal progress bar gives you a fraction and a percentage of how much progress it has. I would like to remove the fraction, and keep the percentage. I'll appreciate your answers. Note that my minimum API level 开发者_StackOverflowis 7.

Perhaps I was not clear enough with question, here is the code that shows the progress bar. Pretty straightforward.

myProgressDialog = new ProgressDialog(this);
                myProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
                myProgressDialog.setCancelable(false);
                myProgressDialog.setProgress(0);
                myProgressDialog.setMax(max);
                myProgressDialog.show(); 

the setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); shows a progress bar. While your progress is being incremented you get progress percentage on the widget as well a progress fraction for example if max was 100.

 _____________________
|=============________|
60%       60/100

this is the widget style provided by android. I want to remove that fraction


The horizontal ProgressBar widget is a bar. It does not "give you a fraction".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜