我如何计算进度条并冻结其他任何东西,最多只计算 10 秒(每秒更新一次)。
ProgressBar PB;
index=0;
while(index<10)
{
/************* wait(one sec)/*********/
PB.setProgress(index);
index++;
}
任何人都可以告诉我这段代码是做什么的
while(index<10)
{
android.os.SystemClock.sleep(1000);//sleep please here one sec
PB.setprogressbar(index); //no i sleep 10 sec and then index=10!!!!
index++;
}
我不会使用线程,