From 6105b0e8a22262949883b04a5fc1a20ac53c5c6a Mon Sep 17 00:00:00 2001 From: jiaoyaning Date: Fri, 9 Aug 2019 10:43:35 +0800 Subject: [PATCH] update README --- README.md | 127 +++++++++++++++++------------------------------------- 1 file changed, 40 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index 5c64864..1bb675e 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,22 @@ # VerificationCodeView + > `Android` 自定义方形输入框,仿滴滴验证码、小篮单车验证码输入框 --- -## 效果图 -## V1.0.1 版 -![Screenshot](screenshot/screenshot_1.0.1.gif) +## V1.0.1 版 效果图 -+ `fix bug` :[验证码输入错误清空输入框 #7](https://github.com/jiaoyaning/VerificationCodeView/issues/7) -+ `fix bug` :[关于博主手机不好,经常点一次却触发两次`onKey`事件,就设置了一个防止多点击,间隔100毫秒。#6](https://github.com/jiaoyaning/VerificationCodeView/issues/6) -+ `fix bug` :暗文密码模式无效果问题 -+ `update` :添加输入框平分等间距模式,并可设置输入框间距 -+ `update` :添加清空输入框方法 -+ `update` :修改`Listener`,添加文本改变时回调方法 +![Screenshot](screenshot/screenshot_1.0.1.gif) + +- `fix bug` :[验证码输入错误清空输入框 #7](https://github.com/jiaoyaning/VerificationCodeView/issues/7) +- `fix bug` :[关于博主手机不好,经常点一次却触发两次`onKey`事件,就设置了一个防止多点击,间隔 100 毫秒。#6](https://github.com/jiaoyaning/VerificationCodeView/issues/6) +- `fix bug` :暗文密码模式无效果问题 +- `update` :添加输入框平分等间距模式,并可设置输入框间距 +- `update` :添加清空输入框方法 +- `update` :修改`Listener`,添加文本改变时回调方法 ### 监听 + ``` public interface OnCodeFinishListener { /** @@ -30,6 +32,7 @@ public interface OnCodeFinishListener { ``` ### attr + ``` @@ -60,82 +63,48 @@ public interface OnCodeFinishListener { ``` -### Gradle +## Gradle + +Step 1. Add it in your root build.gradle at the end of repositories: ``` -dependencies { - implementation 'com.jyn.verificationcodeview:verificationcodeview:1.0.1' +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } } ``` ---- - -分割线 - ---- - - -## V1.0.0版 (源码在`branch` [[`V1.0.0`]](https://github.com/jiaoyaning/VerificationCodeView/tree/V1.0.0)) - - -![Screenshot](screenshot/screenshot.gif) - -`GIF`被压缩的有点模糊,下面是截图 - -![Screenshot](screenshot/screenshot.jpg) +Step 2. Add the dependency +``` +dependencies { + compile 'com.jyn.verificationcodeview:verificationcodeview:1.0.1' +} +``` ## 用法 ``` - ``` -输入完成监听 -``` -verificationcodeview.setOnCodeFinishListener(new VerificationCodeView.OnCodeFinishListener() { - @Override - public void onComplete(String content) { - textView.setText(content); - } - }); -``` -所有属性 -``` - - - - - - - - - - - - - - - - - - - - - -``` + `vcv_et_bg` 背景示例(默认) + ``` @@ -157,7 +126,9 @@ verificationcodeview.setOnCodeFinishListener(new VerificationCodeView.OnCodeFini ``` + `vcv_et_cursor` 光标示例(默认) + ``` ``` - -## Gradle -Step 1. Add it in your root build.gradle at the end of repositories: - -``` -allprojects { - repositories { - ... - maven { url 'https://jitpack.io' } - } -} -``` - -Step 2. Add the dependency - -``` -dependencies { - compile 'com.jyn.verificationcodeview:verificationcodeview:1.0.0' -} -``` +> 备注:V1.0.0 版在 branch - [`V1.0.0`](https://github.com/jiaoyaning/VerificationCodeView/tree/V1.0.0) ## 开发思路 + 简书:[http://www.jianshu.com/p/781950fe5e73](http://www.jianshu.com/p/781950fe5e73) CSDN:[http://blog.csdn.net/jiaoyaning1210/article/details/78427818](http://blog.csdn.net/jiaoyaning1210/article/details/78427818)