我是Android开发的新手并试图制作小游戏.
CountDownTimer.cancel()不适合我.
任何的想法?
谢谢你的回答!
CountDownTimer cdt = new CountDownTimer(120000, 1000) {
public void onTick(long millisUntilFinished) {
maxTime = (int) (millisUntilFinished / 1000);
timer.setText(String.valueOf(maxTime));
}
public void onFinish() {
}
};
if (startTimer == true) {
cdt.start();
} else {
cdt.cancel();
}
Run Code Online (Sandbox Code Playgroud) 是否有可能读取7位数字,如果7位数字返回这个7位数字.
例如:
'Techo*nthenet techo*5684net* Tech4589317net techonthenet'
返回: 4589317