Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

How to make a countdown timer in Android?

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();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #countdown #timer
ADD COMMENT
Topic
Name
9+2 =