Sabbir Ahmed Sabbir Ahmed - 2 months ago 6
Android Question

How to make a countdown Timer in android?

I have two edit texts in xml, In one edittext user can put a number as minute and in another one as seconds. After clicking the finish button the seconds edittext should start to countdown and updating its text every second. Aditionally how can I keep this updating until it comes into zero minutes zero seconds?

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() {


Refer to this link.