How to change the delay of sleep/timer thread in android during runtime?
问题 What I was trying to do was to decrease the timer delay every time the counter becomes a multiple of 5. But, as soon as the code entered the if block, it stopped incrementing the timer. I can't understand what is happening. This is the code thread=new Thread(){ public void run(){ try{ if(count%5==0) timre--; else{ //do nothing } //*******PROGRESS UPDATE********// for(t=0;t<=100;t++) { sleep((timre) / 100); progress.setProgress(t); t += 1; } //****PROGRESS UPDATE OVER****// } catch