diff --git a/README-CN.md b/README-CN.md
index 9d75d79..7db9514 100644
--- a/README-CN.md
+++ b/README-CN.md
@@ -4,7 +4,8 @@
一个安卓验证码输入框控件。
[](http://developer.android.com/index.html)
-[](https://android-arsenal.com/api?level=11)
+[](https://android-arsenal.com/api?level=11)
+
## 演示
防止输入溢出.
@@ -21,7 +22,7 @@
## 版本
名称|SlideMenuLayout
---|---
-最新版本|
+最新|
## 配置
#### Maven
@@ -48,23 +49,23 @@ compile 'com.justkiddingbaby:vercodeedittext:最新版本'
## 属性说明
属性|介绍|取值
---|---|---
-|[figures](/vcedittext-lib/src/main/res/values/attrs.xml)|验证码位数|integer|
-|[verCodeMargin](/vcedittext-lib/src/main/res/values/attrs.xml)|每个验证码的间隔|dimension|
-|[bottomLineSelectedColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线选择状态下的颜色|reference|
-|[bottomLineNormalColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线未选中状态下的颜色|reference|
-|[bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|底线高度|dimension|
-|[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|选中的背景颜色|reference|
+[figures](/vcedittext-lib/src/main/res/values/attrs.xml)|验证码位数|integer
+[verCodeMargin](/vcedittext-lib/src/main/res/values/attrs.xml)|每个验证码的间隔|dimension
+[bottomLineSelectedColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线选择状态下的颜色|reference
+[bottomLineNormalColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线未选中状态下的颜色|reference
+[bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|底线高度|dimension
+[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|选中的背景颜色|reference
## 方法说明
返回值|方法|说明
---|---|---
-|void|[setFigures(int figures)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码位数|
-|void|[setVerCodeMargin(int margin)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码之间的间隔|
-|void|[setBottomSelectedColor(int bottomSelectedColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置底线选中状态的颜色|
-|void|[setBottomNormalColor(int bottomNormalColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置底线未选中状态的颜色|
-|void|[setSelectedBackgroundColor(int selectedBackground)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码选中的背景颜色|
-|void|[setBottomLineHeight(int bottomLineHeight)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码底线的高度|
-|void|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener listener)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码变化的监听器|
+void|[setFigures(int figures)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码位数
+void|[setVerCodeMargin(int margin)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码之间的间隔
+void|[setBottomSelectedColor(int bottomSelectedColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置底线选中状态的颜色
+|oid|[setBottomNormalColor(int bottomNormalColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置底线未选中状态的颜色
+void|[setSelectedBackgroundColor(int selectedBackground)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码选中的背景颜色
+void|[setBottomLineHeight(int bottomLineHeight)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码底线的高度
+void|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener listener)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|设置验证码变化的监听器
## 使用
#### 在布局中使用
@@ -85,6 +86,8 @@ compile 'com.justkiddingbaby:vercodeedittext:最新版本'
```
## 发布历史
+ #### v1.0.2(2017/6/29)
+ 1、修复AndroidMainfest.xml中application标签下allowBackup属性为false的冲突.
#### v1.0.1(2017/6/27)
1、修复点击后无法获取焦点问题.
#### v1.0.0(2017/6/12)
diff --git a/README.md b/README.md
index 57738e0..3b90fd8 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,8 @@ An android Verification code EditText.
一个安卓验证码输入框控件。([中文版入口](README-CN.md))
[](http://developer.android.com/index.html)
-[](https://android-arsenal.com/api?level=11)
+[](https://android-arsenal.com/api?level=11)
+
## Demo
Prevent input overflow.
@@ -20,9 +21,9 @@ Prevent input overflow.
- [x] **Attributes can be configured for customization**
## Version
-name|SlideMenuLayout
+name|VercodeEditText
---|---
-latest|
+latest|
## Configure
#### Maven
@@ -49,23 +50,23 @@ compile 'com.justkiddingbaby:vercodeedittext:the latest version'
## Attributes instruction
attribute|instruction|value
---|---|---
-|[figures](/vcedittext-lib/src/main/res/values/attrs.xml)|the verification code length|integer|
-|[verCodeMargin](/vcedittext-lib/src/main/res/values/attrs.xml)|the padding for each verification code number|dimension|
-|[bottomLineSelectedColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the color of bottom line is select status|reference|
-|[bottomLineNormalColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the color of bottom line is normal status|reference|
-|[bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|the height of bottom line|dimension|
-|[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the background color of verification code is select status|reference|
+[figures](/vcedittext-lib/src/main/res/values/attrs.xml)|the verification code length|integer
+[verCodeMargin](/vcedittext-lib/src/main/res/values/attrs.xml)|the padding for each verification code number|dimension
+[bottomLineSelectedColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the color of bottom line is select status|reference
+[bottomLineNormalColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the color of bottom line is normal status|reference
+[bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|the height of bottom line|dimension
+[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the background color of verification code is select status|reference
## Function instruction
return|function name|instruction
---|---|---
-|void|[setFigures(int figures)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the verification code length|
-|void|[setVerCodeMargin(int margin)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the padding for each verification code number|
-|void|[setBottomSelectedColor(int bottomSelectedColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the color of bottom line is select status|
-|void|[setBottomNormalColor(int bottomNormalColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the color of bottom line is normal status|
-|void|[setSelectedBackgroundColor(int selectedBackground)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the background color of verification code is select status|
-|void|[setBottomLineHeight(int bottomLineHeight)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the height of bottom line|
-|void|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener listener)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|add the listener when verification value is changing|
+void|[setFigures(int figures)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the verification code length
+void|[setVerCodeMargin(int margin)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the padding for each verification code number
+void|[setBottomSelectedColor(int bottomSelectedColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the color of bottom line is select status
+void|[setBottomNormalColor(int bottomNormalColor)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the color of bottom line is normal status
+void|[setSelectedBackgroundColor(int selectedBackground)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the background color of verification code is select status
+void|[setBottomLineHeight(int bottomLineHeight)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|set the height of bottom line
+void|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener listener)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|add the listener when verification value is changing|
## Usage
#### use in the layout
@@ -86,6 +87,8 @@ return|function name|instruction
```
## Release history
+ #### v1.0.2(2017/6/29)
+ 1、Fix the conflict that allowBackup property is false under the application in AndroidMainfet.xml file.
#### v1.0.1(2017/6/27)
1、fix bug:can't get focus when the view is touched.
#### v1.0.0(2017/6/12)
diff --git a/app/build.gradle b/app/build.gradle
index d7f809b..c2f7ccc 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,59 +1,54 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
- def appVerCode = 1
- def appVerName = "0.0.1"
+
+ compileSdkVersion rootProject.ext.android.compileSdkVersion
+ buildToolsVersion rootProject.ext.android.buildToolsVersion
+
defaultConfig {
- applicationId "com.jkb.vercodeedittext"
- minSdkVersion rootProject.ext.minSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode appVerCode
- versionName appVerName
+ applicationId rootProject.ext.app.applicationId
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
+ versionCode rootProject.ext.app.versionCode
+ versionName rootProject.ext.app.versionName
}
+
compileOptions {
- sourceCompatibility rootProject.ext.sourceCompatibilityVersion
- targetCompatibility rootProject.ext.targetCompatibilityVersion
+ sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion
+ targetCompatibility rootProject.ext.android.targetCompatibilityVersion
}
signingConfigs {
- debug {
- storeFile file(STORE_FILE)
- storePassword STORE_PASSWORD
- keyAlias KEY_ALIAS
- keyPassword KEY_PASSWORD
- v2SigningEnabled false
- }
- release {
- storeFile file(STORE_FILE)
- storePassword STORE_PASSWORD
- keyAlias KEY_ALIAS
- keyPassword KEY_PASSWORD
+ myConfig {
+ storeFile file(rootProject.ext.store.storeKey)
+ storePassword rootProject.ext.store.storePassword
+ keyAlias rootProject.ext.store.keyAlias
+ keyPassword rootProject.ext.store.keyPassword
v2SigningEnabled false
}
}
buildTypes {
release {
- minifyEnabled false //混淆编译
- shrinkResources false //移除无用的资源文件
- zipAlignEnabled true //是否启用zipAlign压缩
- signingConfig signingConfigs.release
+ minifyEnabled true
+ //是否清理无用资源
+ shrinkResources true
+ //是否启用zipAlign压缩
+ zipAlignEnabled true
+ signingConfig signingConfigs.myConfig
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
- minifyEnabled false
- zipAlignEnabled false
- shrinkResources false
- signingConfig signingConfigs.debug
+ signingConfig signingConfigs.myConfig
+ versionNameSuffix "-debug"
}
}
- lintOptions { abortOnError false }
+ lintOptions {
+ abortOnError false
+ }
}
dependencies {
- compile deps.appcompat_v7
- compile project(':vcedittext-lib')
+ compile project(":vcedittext-lib")
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a54a0fa..7767364 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,19 +1,16 @@
+ package="com.jkb.vercodeedittext">
-
+
-
+
diff --git a/build.gradle b/build.gradle
index 9a2508e..81763b5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply from: "config.gradle"
+
buildscript {
repositories {
jcenter()
@@ -28,19 +30,3 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}
-
-ext {
- minSdkVersion = 15
- targetSdkVersion = 25
- compileSdkVersion = 25
- buildToolsVersion = "25.0.2"
- sourceCompatibilityVersion = JavaVersion.VERSION_1_7
- targetCompatibilityVersion = JavaVersion.VERSION_1_7
-}
-
-ext.deps = [
- //Junit
- junit : 'junit:junit:4.12',
- //v
- appcompat_v7: 'com.android.support:appcompat-v7:25.3.1'
-]
diff --git a/config.gradle b/config.gradle
new file mode 100644
index 0000000..165a232
--- /dev/null
+++ b/config.gradle
@@ -0,0 +1,39 @@
+ext {
+ app = [
+ appVerCode : 1,
+ appVerName : "0.0.1",
+ applicationId: "com.jkb.yjchart"
+ ]
+
+ vercode = [
+ publishCode : 3,
+ publishVersion: "1.0.2",
+
+ userOrg : 'jkb',
+ groupId : 'com.justkiddingbaby',
+ artifactId : 'vercodeedittext',
+ desc : 'An Android vercode EditText.(一个安卓验证码输入框)',
+ website : 'https://github.com/YangJing96/VercodeEditText'
+ ]
+
+ android = [
+ minSdkVersion : 12,
+ targetSdkVersion : 23,
+ compileSdkVersion : 23,
+ buildToolsVersion : "25.0.0",
+ sourceCompatibilityVersion: JavaVersion.VERSION_1_7,
+ targetCompatibilityVersion: JavaVersion.VERSION_1_7
+ ]
+
+ dependencies = [
+ appcompatV7: 'com.android.support:appcompat-v7:23.3.0',
+ design : 'com.android.support:design:24.0.0'
+ ]
+
+ store = [
+ storeKey : '../sign/JustKiddingBaby.jks',
+ storePassword: 'mimajiushiwo',
+ keyAlias : 'JustKiddingBaby',
+ keyPassword : 'mimajiushiwo'
+ ]
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 743af53..f1c49f3 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -14,14 +14,4 @@ org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-STORE_FILE=../sign/JustKiddingBaby.jks
-STORE_PASSWORD=mimajiushiwo
-KEY_ALIAS=JustKiddingBaby
-KEY_PASSWORD=mimajiushiwo
-
-COMPILE_SDK_VERSION=23
-BUILDTOOLS_VERSION=25.0.2
-SUPPORT_LIB_VERSION=23.0.0
-MIN_SDK_VERSION=12
-TARGET_SDK_VERSION=23
\ No newline at end of file
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/vcedittext-lib/build.gradle b/vcedittext-lib/build.gradle
index 9f835a0..4b61886 100644
--- a/vcedittext-lib/build.gradle
+++ b/vcedittext-lib/build.gradle
@@ -1,37 +1,44 @@
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
-def appVerCode = 2
-def appVerName = "1.0.1"
-
publish {
- userOrg = 'jkb'
- groupId = 'com.justkiddingbaby'
- artifactId = 'vercodeedittext'
- publishVersion = appVerName
- desc = 'An Android vercode EditText.(一个安卓验证码输入框)'
- website = 'https://github.com/YangJing96/VercodeEditText'
+ userOrg = rootProject.ext.vercode.userOrg
+ groupId = rootProject.ext.vercode.groupId
+ artifactId = rootProject.ext.vercode.artifactId
+ publishVersion = rootProject.ext.vercode.publishVersion
+ desc = rootProject.ext.vercode.desc
+ website = rootProject.ext.vercode.website
}
android {
- compileSdkVersion Integer.parseInt(COMPILE_SDK_VERSION)
- buildToolsVersion BUILDTOOLS_VERSION
+
+ compileSdkVersion rootProject.ext.android.compileSdkVersion
+ buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
- minSdkVersion Integer.parseInt(MIN_SDK_VERSION)
- targetSdkVersion Integer.parseInt(TARGET_SDK_VERSION)
- versionCode appVerCode
- versionName appVerName
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
+ versionCode rootProject.ext.vercode.publishCode
+ versionName rootProject.ext.vercode.publishVersion
}
+
+ compileOptions {
+ sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion
+ targetCompatibility rootProject.ext.android.targetCompatibilityVersion
+ }
+
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
- lintOptions { abortOnError false }
+
+ lintOptions {
+ abortOnError false
+ }
}
dependencies {
- compile "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
+ compile rootProject.ext.dependencies.appcompatV7
}
diff --git a/vcedittext-lib/src/main/AndroidManifest.xml b/vcedittext-lib/src/main/AndroidManifest.xml
index 07422c9..6916297 100644
--- a/vcedittext-lib/src/main/AndroidManifest.xml
+++ b/vcedittext-lib/src/main/AndroidManifest.xml
@@ -1,9 +1,9 @@
+ package="com.jkb.vcedittext">
-
+