Action:release v1.0.2

Description:发布版本v1.0.2
This commit is contained in:
yj
2017-06-29 15:31:25 +08:00
parent e222c7ab85
commit 5905c626c3
9 changed files with 138 additions and 118 deletions

View File

@@ -4,7 +4,8 @@
一个安卓验证码输入框控件。 一个安卓验证码输入框控件。
[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html) [![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)
<img src="https://img.shields.io/badge/license-Apache 2.0-green.svg?style=flat"> <img src="https://img.shields.io/badge/license-Apache 2.0-green.svg?style=flat">
[![API](https://img.shields.io/badge/API-12%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=11) [![SDK](https://img.shields.io/badge/API-12%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=11)
![VercodeEditText](https://api.bintray.com/packages/jkb/maven/vercodeedittext/images/download.svg)
## 演示 ## 演示
防止输入溢出. 防止输入溢出.
@@ -21,7 +22,7 @@
## 版本 ## 版本
名称|SlideMenuLayout 名称|SlideMenuLayout
---|--- ---|---
最新版本|![Download](https://api.bintray.com/packages/jkb/maven/vercodeedittext/images/download.svg) 最新|![VercodeEditText](https://api.bintray.com/packages/jkb/maven/vercodeedittext/images/download.svg)
## 配置 ## 配置
#### Maven #### Maven
@@ -48,23 +49,23 @@ compile 'com.justkiddingbaby:vercodeedittext:最新版本'
## 属性说明 ## 属性说明
属性|介绍|取值 属性|介绍|取值
---|---|--- ---|---|---
|[figures](/vcedittext-lib/src/main/res/values/attrs.xml)|验证码位数|integer| [figures](/vcedittext-lib/src/main/res/values/attrs.xml)|验证码位数|integer
|[verCodeMargin](/vcedittext-lib/src/main/res/values/attrs.xml)|每个验证码的间隔|dimension| [verCodeMargin](/vcedittext-lib/src/main/res/values/attrs.xml)|每个验证码的间隔|dimension
|[bottomLineSelectedColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线选择状态下的颜色|reference| [bottomLineSelectedColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线选择状态下的颜色|reference
|[bottomLineNormalColor](/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| [bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|底线高度|dimension
|[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|选中的背景颜色|reference| [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|[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|[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|[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)|设置底线未选中状态的颜色| |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|[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|[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|[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) #### v1.0.1(2017/6/27)
1、修复点击后无法获取焦点问题. 1、修复点击后无法获取焦点问题.
#### v1.0.0(2017/6/12) #### v1.0.0(2017/6/12)

View File

@@ -5,7 +5,8 @@ An android Verification code EditText.
一个安卓验证码输入框控件。([中文版入口](README-CN.md)) 一个安卓验证码输入框控件。([中文版入口](README-CN.md))
[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html) [![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)
<img src="https://img.shields.io/badge/license-Apache 2.0-green.svg?style=flat"> <img src="https://img.shields.io/badge/license-Apache 2.0-green.svg?style=flat">
[![API](https://img.shields.io/badge/API-12%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=11) [![SDK](https://img.shields.io/badge/API-12%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=11)
![VercodeEditText](https://api.bintray.com/packages/jkb/maven/vercodeedittext/images/download.svg)
## Demo ## Demo
Prevent input overflow. Prevent input overflow.
@@ -20,9 +21,9 @@ Prevent input overflow.
- [x] **Attributes can be configured for customization** - [x] **Attributes can be configured for customization**
## Version ## Version
name|SlideMenuLayout name|VercodeEditText
---|--- ---|---
latest|![Download](https://api.bintray.com/packages/jkb/maven/vercodeedittext/images/download.svg) latest|![VercodeEditText](https://api.bintray.com/packages/jkb/maven/vercodeedittext/images/download.svg)
## Configure ## Configure
#### Maven #### Maven
@@ -49,23 +50,23 @@ compile 'com.justkiddingbaby:vercodeedittext:the latest version'
## Attributes instruction ## Attributes instruction
attribute|instruction|value attribute|instruction|value
---|---|--- ---|---|---
|[figures](/vcedittext-lib/src/main/res/values/attrs.xml)|the verification code length|integer| [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| [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| [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| [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| [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| [selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the background color of verification code is select status|reference
## Function instruction ## Function instruction
return|function name|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|[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|[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|[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|[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|[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|[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|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener listener)](/vcedittext-lib/src/main/java/com/jkb/vcedittext/VerificationAction.java)|add the listener when verification value is changing|
## Usage ## Usage
#### use in the layout #### use in the layout
@@ -86,6 +87,8 @@ return|function name|instruction
``` ```
## Release history ## 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) #### v1.0.1(2017/6/27)
1、fix bug:can't get focus when the view is touched. 1、fix bug:can't get focus when the view is touched.
#### v1.0.0(2017/6/12) #### v1.0.0(2017/6/12)

View File

@@ -1,59 +1,54 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion compileSdkVersion rootProject.ext.android.compileSdkVersion
def appVerCode = 1 buildToolsVersion rootProject.ext.android.buildToolsVersion
def appVerName = "0.0.1"
defaultConfig { defaultConfig {
applicationId "com.jkb.vercodeedittext" applicationId rootProject.ext.app.applicationId
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode appVerCode versionCode rootProject.ext.app.versionCode
versionName appVerName versionName rootProject.ext.app.versionName
} }
compileOptions { compileOptions {
sourceCompatibility rootProject.ext.sourceCompatibilityVersion sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion
targetCompatibility rootProject.ext.targetCompatibilityVersion targetCompatibility rootProject.ext.android.targetCompatibilityVersion
} }
signingConfigs { signingConfigs {
debug { myConfig {
storeFile file(STORE_FILE) storeFile file(rootProject.ext.store.storeKey)
storePassword STORE_PASSWORD storePassword rootProject.ext.store.storePassword
keyAlias KEY_ALIAS keyAlias rootProject.ext.store.keyAlias
keyPassword KEY_PASSWORD keyPassword rootProject.ext.store.keyPassword
v2SigningEnabled false
}
release {
storeFile file(STORE_FILE)
storePassword STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
v2SigningEnabled false v2SigningEnabled false
} }
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false //混淆编译 minifyEnabled true
shrinkResources false //移除无用资源文件 //是否清理无用资源
zipAlignEnabled true //是否启用zipAlign压缩 shrinkResources true
signingConfig signingConfigs.release //是否启用zipAlign压缩
zipAlignEnabled true
signingConfig signingConfigs.myConfig
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
debug { debug {
minifyEnabled false signingConfig signingConfigs.myConfig
zipAlignEnabled false versionNameSuffix "-debug"
shrinkResources false
signingConfig signingConfigs.debug
} }
} }
lintOptions { abortOnError false } lintOptions {
abortOnError false
}
} }
dependencies { dependencies {
compile deps.appcompat_v7 compile project(":vcedittext-lib")
compile project(':vcedittext-lib')
} }

View File

@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jkb.vercodeedittext"> package="com.jkb.vercodeedittext">
<application <application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".MainActivity"> <activity android:name=".MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>

View File

@@ -1,5 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
@@ -28,19 +30,3 @@ allprojects {
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir 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'
]

39
config.gradle Normal file
View File

@@ -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'
]
}

View File

@@ -14,14 +14,4 @@ org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # 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 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # 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

View File

@@ -1,37 +1,44 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release' apply plugin: 'com.novoda.bintray-release'
def appVerCode = 2
def appVerName = "1.0.1"
publish { publish {
userOrg = 'jkb' userOrg = rootProject.ext.vercode.userOrg
groupId = 'com.justkiddingbaby' groupId = rootProject.ext.vercode.groupId
artifactId = 'vercodeedittext' artifactId = rootProject.ext.vercode.artifactId
publishVersion = appVerName publishVersion = rootProject.ext.vercode.publishVersion
desc = 'An Android vercode EditText.(一个安卓验证码输入框)' desc = rootProject.ext.vercode.desc
website = 'https://github.com/YangJing96/VercodeEditText' website = rootProject.ext.vercode.website
} }
android { android {
compileSdkVersion Integer.parseInt(COMPILE_SDK_VERSION)
buildToolsVersion BUILDTOOLS_VERSION compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig { defaultConfig {
minSdkVersion Integer.parseInt(MIN_SDK_VERSION) minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion Integer.parseInt(TARGET_SDK_VERSION) targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode appVerCode versionCode rootProject.ext.vercode.publishCode
versionName appVerName versionName rootProject.ext.vercode.publishVersion
} }
compileOptions {
sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion
targetCompatibility rootProject.ext.android.targetCompatibilityVersion
}
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
lintOptions { abortOnError false }
lintOptions {
abortOnError false
}
} }
dependencies { dependencies {
compile "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}" compile rootProject.ext.dependencies.appcompatV7
} }

View File

@@ -1,9 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jkb.vcedittext"> package="com.jkb.vcedittext">
<application android:allowBackup="true" android:label="@string/app_name" <application
android:supportsRtl="true"> android:label="@string/app_name">
</application> </application>