CaptchaImageView
项目地址: jineshfrancs/CaptchaImageView

简介:Custom ImageView to generate captcha image.
Custom ImageView to generate captcha image.
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' }