public String makeCheckCode() {StringBuffer sb new StringBuffer();for (int i 0; i < 5; i) {int temp (int) (Math.random() * 10);sb.append(temp);}return sb.toString();
}
final int duration new Random().nextInt(60) * 1000; /*获取一条随机字符串*/ p…
自定义验证码图片view
public class CheckView extends View {Context mContext;String mCheckCode null;Paint mTempPaint new Paint();private final int mPointNum;private final int mLineNum;private int mTextLength;private final float mTextSize;
// private f…
/1、全部替代你的项目build.gradle内容:
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {repositories {
// maven {
// url https://maven.google.com
// }mavenCe…