zoukankan      html  css  js  c++  java
  • 发送验证码

     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();
  • 相关阅读:
    走亲访友
    分而治之
    红色警报
    小字辈
    最长对称子串
    树的遍历
    acwing练习
    组合计数
    同余
    乘法逆元
  • 原文地址:https://www.cnblogs.com/androidsj/p/4762430.html
Copyright © 2011-2022 走看看