1.Android开发CountDownTimer终止倒计时
Android开发CountDownTimer终止倒计时
/ timer Util
/* 定义一个倒计时的源码微信多用户源码内部类 */
class TimeCount extends CountDownTimer { public TimeCount(long millisInFuture, long countDownInterval) { super(millisInFuture, countDownInterval);// 参数依次为总时长,和计时的时间间隔 }
@Override public void onFinish() { // 计时完毕时触发
checking.setText("重新验证");
checking.setClickable(true);
}
@Override public void onTick(long millisUntilFinished) { // 计时过程显示
checking.setClickable(false);
checking.setText(millisUntilFinished / + "秒");
}
}
2024-11-20 21:11
2024-11-20 21:01
2024-11-20 20:20
2024-11-20 19:39
2024-11-20 19:38
2024-11-20 19:37
2024-11-20 19:15
2024-11-20 19:10