Android倒计时器,支持开始倒计时、暂停倒计时、继续倒计时、停止倒计时、重新倒计时
compile 'com.dyhdyh.support:count-down-timer:1.0.2'
//总时长 间隔时间
CountDownTimerSupport mTimer = new CountDownTimerSupport(millisInFuture, countDownInterval);
mTimer.setOnCountDownTimerListener(new OnCountDownTimerListener() {
@Override
public void onTick(long millisUntilFinished) {
//间隔回调
}
@Override
public void onFinish() {
//计时器停止
}
});
mTimer.start();
mTimer.pause();
mTimer.resume();
mTimer.stop();
mTimer.reset();
mTimer.start();