您当前的位置: 首页 >  android

Android 验证码测试效果

发布时间:2017-08-16 18:30:25 ,浏览量:0

CaptchaImageView
项目地址: jineshfrancs/CaptchaImageView
简介:Custom ImageView to generate captcha image.

Github All Releases 

Custom ImageView to generate captcha image.

Output sample Output sample

Add CaptchaImageView to your layout


			

Call regenerate() method on CaptchaImageView to regenerate your captcha

captchaImageView= (CaptchaImageView) findViewById(R.id.image);
 refreshButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                captchaImageView.regenerate();
            }
 });

Call getCaptchaCode() method on CaptchaImageView to read last generated captcha code.

captchaImageView.getCaptchaCode()
Use in your project

1.Add it in your root build.gradle at the end of repositories:

allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

2.Add the dependency in your app build.gradle file:

dependencies {
            compile 'com.github.jineshfrancs:CaptchaImageView:1.0'
}
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    110950博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0526s