验证码倒计时

移动开发
验证码相关: 1、发送短信验证码按钮的倒计时 2、按钮的并行监听 3、finish之后,后台线程依旧进行计时 【附注:】此源码与之前 子豪 的机制完全不一样,因此不是重复代码,可以放心下载!


源码简介

验证码相关: 1、发送短信验证码按钮的倒计时 2、按钮的并行监听 3、finish之后,后台线程依旧进行计时 【附注:】此源码与之前 子豪 的机制完全不一样,因此不是重复代码,可以放心下载!
源码截图

源码片段:

public class TestMainActivity extends Activity implements OnClickListener { 
  
    private MyCodeButton v; 
  
    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.activity_main); 
        v = (MyCodeButton) findViewById(R.id.button1); 
        v.onCreate(savedInstanceState); 
        v.setTextAfter("s后重新获取").setTextBefore("获取验证码").setLenght(60 * 1000); 
        v.setOnClickListener(this); 
    } 
  
    @Override 
    public void onClick(View v) { 
        // TODO Auto-generated method stub 
        Toast.makeText(TestMainActivity.this"并行处理点击事件..."
                Toast.LENGTH_SHORT).show(); 
    } 
  
    @Override 
    protected void onDestroy() { 
        // TODO Auto-generated method stub 
        v.onDestroy(); 
        super.onDestroy(); 
    } 

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.

源码链接:http://down.51cto.com/upload

责任编辑:chenqingxiang 来源: 网络整理
相关推荐

2015-01-21 16:07:57

Android源码验证码倒计时

2019-08-23 09:52:59

Axure 产品经理

2017-07-20 16:21:52

UICountDownTidelay

2022-10-21 15:42:21

倒计时鸿蒙

2014-03-21 13:46:45

2014-08-18 14:30:27

Android倒计时

2011-04-11 09:17:28

Ubuntu倒计时

2011-04-11 09:50:56

Ubuntu 11.0

2014-02-18 10:36:33

2013-10-08 09:24:39

Windows 8.1Windows 8

2022-06-14 08:45:27

浏览器IEWindows

2023-08-16 11:23:59

2013-04-09 10:01:18

微软Windows XP

2013-10-10 09:23:15

Android 4.4Kitkat

2019-12-13 19:37:00

BashLinux命令

2020-10-28 17:54:49

成都信息安全

2012-12-28 13:50:00

2012-03-28 09:37:07

Ubuntu 12.0倒计时

2013-06-19 10:19:59

点赞
收藏

51CTO技术栈公众号