我必须更改以便计时器在10分钟后显示10:00而不是010:00。我知道如何解决它,但它没有解决原始问题 - 如果从(textTimer.setText("0" + minutes + ":")
删除“0”,当它低于10时显示0:00
。如何让它显示10分钟后10:00和10分钟前00:00。感谢
public void run() {
timeInMillies = SystemClock.uptimeMillis() - startTime;
finalTime = timeSwap + timeInMillies;
int seconds = (int) (finalTime / 1000);
int minutes = seconds / 60;
seconds = seconds % 60;
int milliseconds = (int) (finalTime % 1000);
textTimer.setText("0" + minutes + ":"
+ String.format("%02d", seconds));
myHandler.postDelayed(this, 0);
}