项目
在 GitHub 查看
jineshfrancs/CaptchaImageView
关于
用于生成验证码图片的自定义 ImageView。
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文CaptchaImageView
Custom ImageView to generate captcha image.

Add CaptchaImageView to your layout
<test.jinesh.captchaimageviewlib.CaptchaImageView
android:layout_width="wrap_content"
android:id="@+id/image"
android:layout_weight="6"
android:layout_margin="5dp"
android:layout_height="50dp"
/>
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'
}
探索相关项目
加载中…