📜  如何在Android中制作倒数计时器? - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:33.994000             🧑  作者: Mango

代码示例1
new CountDownTimer(30000, 1000) {

    public void onTick(long millisUntilFinished) {
        mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
       //here you can have your logic to set text to edittext
    }

    public void onFinish() {
        mTextField.setText("done!");
    }

}.start();