使用CountDownTimer实现倒计时功能
2014-03-27 11:32
483 查看
// 倒计时60s new CountDownTimer(60000, 1000) { @Override public void onTick(long millisUntilFinished) { mReGetAuthCodeButton .setText(getString(R.string.tip_get_code_time, millisUntilFinished / 1000)); } @Override public void onFinish() { mBackAble = true; mReGetAuthCodeButton .setBackgroundResource(R.drawable.blue_button_selector); mReGetAuthCodeButton.setText(R.string.re_get_code); } }.start();
之前使用handler thread实现,发现非常影响其它view的响应,改为这个很好。
http://blog.csdn.net/yuanjh2001/article/details/6075315
相关文章推荐
- 注册时手机获取验证码倒计时,使用CountDownTimer类轻松实现倒计时功能
- 使用CountDownTimer类轻松实现倒计时功能
- (六)Android中使用CountDownTimer实现倒计时功能
- Android 使用CountDownTimer实现倒计时的功能
- Android使用CountDownTimer实现倒计时功能
- 使用CountDownTimer实现倒计时功能
- Android 倒计时类CountDownTimer快速实现倒计时功能
- Android使用CountDownTimer实现短信验证码倒计时
- 使用GCD 实现倒计时功能
- 使用CountDownTimer实现倒计时
- android倒计时功能的实现(CountDownTimer)
- android倒计时功能的实现(CountDownTimer)
- 倒计时功能的实现(CountDownTimer)
- android倒计时功能的实现(CountDownTimer)
- android倒计时功能的实现(CountDownTimer)
- Android实现倒计时之使用CountDownTimer
- 使用ScriptManager+UpdatePanel+Timer控件实现在GridView中倒计时功能
- Android中CountDownTimer 实现倒计时功能
- 微信小程序+WEB使用JS实现注册【60s】倒计时功能
- 使用Sharepreference+Thread+Handler进行异步处理实现倒计时功能