Android加载进度条

时间:2013-12-09 23:25:52

标签: android view

我正在尝试使用百分比计算中的数据设置ProgressBar。 我在mProgress.setProgress(progresso);

中收到错误
DecimalFormat decimalFormat = new DecimalFormat("0.#");
String perc = decimalFormat.format(value);
tvPercentuale.setText(perc+"%");

ProgressBar mProgress;
int progresso = Integer.parseInt(perc); 
mProgress = (ProgressBar) findViewById(R.id.progress_e);
mProgress.setProgress(progresso);
mProgress.setMax(100);

0 个答案:

没有答案
相关问题