码迷,mamicode.com
首页 > 其他好文 > 详细

发送验证码

时间:2015-08-27 10:46:21      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

 1 CountDownTimer countDownTimer = new CountDownTimer(60000,1000) {
 2 
 3         @Override
 4         public void onTick(long millisUntilFinished) {
 5             btn_center_phone_act_Send.setBackgroundColor(mActivity.getResources().getColor(
 6                     R.color.font_light_gray));
 7             btn_center_phone_act_Send.setTextColor(mActivity.getResources().getColor(R.color.white));
 8             btn_center_phone_act_Send.setText("" + millisUntilFinished / 1000 + "秒");
 9             btn_center_phone_act_Send.setClickable(false);
10         }
11 
12         @Override
13         public void onFinish() {
14             btn_center_phone_act_Send.setClickable(true);
15             btn_center_phone_act_Send.setText("重新获取");
16             btn_center_phone_act_Send.setTextColor(mActivity.getResources().getColor(R.color.blue));
17             btn_center_phone_act_Send.setBackgroundResource(R.drawable.textview_square_on_selector);
18         }
19     };

 

countDownTimer.start();

 

发送验证码

标签:

原文地址:http://www.cnblogs.com/androidsj/p/4762430.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!