-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
845 additions
and
771 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/SplitEditText/master/app/release/app-release.apk) | ||
[![JCenter](https://img.shields.io/badge/JCenter-1.0.0-46C018.svg)](https://bintray.com/beta/#/jenly/maven/splitedittext) | ||
[![MavenCentral](https://img.shields.io/maven-central/v/com.github.jenly1314/splitedittext)](https://repo1.maven.org/maven2/com/github/jenly1314/splitedittext) | ||
[![JitPack](https://jitpack.io/v/jenly1314/SplitEditText.svg)](https://jitpack.io/#jenly1314/SplitEditText) | ||
[![CI](https://travis-ci.org/jenly1314/SplitEditText.svg?branch=master)](https://travis-ci.org/jenly1314/SplitEditText) | ||
[![CircleCI](https://circleci.com/gh/jenly1314/SplitEditText.svg?style=svg)](https://circleci.com/gh/jenly1314/SplitEditText) | ||
|
@@ -12,8 +13,6 @@ | |
|
||
SplitEditText for Android 是一个灵活的分割编辑框。常常应用于 **验证码输入** 、**密码输入** 、等场景。 | ||
|
||
> 之所以造这个轮子,是因为之前有这样的需求,然后也用过其它类似开源的库([VerificationCodeView](https://github.com/JackTuoTuo/VerificationCodeView)),但是需求随着需求的变动,之前使用的库就不太满足现有的需求。所以最近抽空写了一个。 | ||
## 特性说明 | ||
- [x] 支持设置框数量 | ||
- [x] 支持设置框的风格样式 | ||
|
@@ -42,37 +41,24 @@ SplitEditText for Android 是一个灵活的分割编辑框。常常应用于 ** | |
|
||
## 引入 | ||
|
||
### Maven: | ||
```maven | ||
<dependency> | ||
<groupId>com.king.view</groupId> | ||
<artifactId>splitedittext</artifactId> | ||
<version>1.0.0</version> | ||
<type>pom</type> | ||
</dependency> | ||
``` | ||
### Gradle: | ||
```gradle | ||
//AndroidX | ||
implementation 'com.king.view:splitedittext:1.0.0' | ||
``` | ||
1. 在Project的 **build.gradle** 里面添加远程仓库 | ||
|
||
### Lvy: | ||
```lvy | ||
<dependency org='com.king.view' name='splitedittext' rev='1.0.0'> | ||
<artifact name='$AID' ext='pom'></artifact> | ||
</dependency> | ||
``` | ||
|
||
###### 如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的GitPack来complie) | ||
```gradle | ||
allprojects { | ||
repositories { | ||
maven { url 'https://dl.bintray.com/jenly/maven' } | ||
//... | ||
mavenCentral() | ||
} | ||
} | ||
``` | ||
|
||
2. 在Module的 **build.gradle** 里面添加引入依赖项 | ||
```gradle | ||
// AndroidX 版本 | ||
implementation 'com.github.jenly1314:splitedittext:1.1.0' | ||
``` | ||
|
||
## 示例 | ||
|
||
布局示例 | ||
|
@@ -125,38 +111,41 @@ Java | |
|
||
## 相关推荐 | ||
|
||
[CodeTextField](https://github.com/jenly1314/CodeTextField) 一个使用 Compose 实现的验证码输入框 | ||
|
||
[KingKeyboard](https://github.com/jenly1314/KingKeyboard) 自定义键盘,满足各种不同场景的键盘输入需求 | ||
|
||
## 版本记录 | ||
|
||
#### v1.1.0:2023-1-9 (开始发布至MavenCentral) | ||
* 迁移发布至MavenCentral | ||
|
||
#### v1.0.0:2021-1-5 | ||
* SplitEditText初始版本 | ||
|
||
## 赞赏 | ||
如果您喜欢SplitEditText,或感觉SplitEditText帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:<p> | ||
您也可以扫描下面的二维码,请作者喝杯咖啡 :coffee: | ||
<div> | ||
<img src="https://jenly1314.github.io/image/pay/wxpay.png" width="280" heght="350"> | ||
<img src="https://jenly1314.github.io/image/pay/alipay.png" width="280" heght="350"> | ||
<img src="https://jenly1314.github.io/image/pay/qqpay.png" width="280" heght="350"> | ||
<img src="https://jenly1314.github.io/image/alipay_red_envelopes.jpg" width="233" heght="350"> | ||
</div> | ||
<div> | ||
<img src="https://jenly1314.github.io/image/pay/sponsor.png" width="98%"> | ||
</div> | ||
|
||
## 关于我 | ||
Name: <a title="关于作者" href="https://about.me/jenly1314" target="_blank">Jenly</a> | ||
Name: <a title="关于作者" href="https://jenly1314.github.io" target="_blank">Jenly</a> | ||
|
||
Email: <a title="欢迎邮件与我交流" href="mailto:[email protected]" target="_blank">jenly1314#gmail.com</a> / <a title="给我发邮件" href="mailto:[email protected]" target="_blank">jenly1314#vip.qq.com</a> | ||
Email: <a title="欢迎邮件与我交流" href="mailto:[email protected]" target="_blank">jenly1314#gmail.com</a> / <a title="给我发邮件" href="mailto:[email protected]" target="_blank">jenly1314#vip.qq.com</a> | ||
|
||
CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a> | ||
CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a> | ||
|
||
CNBlogs: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a> | ||
CNBlogs: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a> | ||
|
||
GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a> | ||
GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a> | ||
|
||
Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a> | ||
Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a> | ||
|
||
加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a> | ||
加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a> | ||
<div> | ||
<img src="https://jenly1314.github.io/image/jenly666.png"> | ||
<img src="https://jenly1314.github.io/image/qqgourp.png"> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": 2, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "com.king.view.splitedittext.app", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"versionCode": 2, | ||
"versionName": "1.1.0", | ||
"outputFile": "app-release.apk" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,29 @@ android.useAndroidX = true | |
# Automatically convert third-party libraries to use AndroidX | ||
android.enableJetifier = true | ||
# Kotlin code style for this project: "official" or "obsolete": | ||
kotlin.code.style = official | ||
kotlin.code.style = official | ||
|
||
VERSION_NAME=1.1.0 | ||
VERSION_CODE=2 | ||
GROUP=com.github.jenly1314 | ||
|
||
POM_DESCRIPTION=SplitEditText for Android | ||
POM_URL=https://github.com/jenly1314/SplitEditText | ||
|
||
POM_SCM_URL=https://github.com/jenly1314/SplitEditText | ||
POM_SCM_CONNECTION=scm:[email protected]:jenly1314/SplitEditText.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:jenly1314/SplitEditText.git | ||
|
||
POM_LICENCE_NAME=The MIT License | ||
POM_LICENCE_URL=https://opensource.org/licenses/mit-license.php | ||
#POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
#POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
|
||
POM_DEVELOPER_ID=jenly | ||
POM_DEVELOPER_NAME=Jenly Yu | ||
POM_DEVELOPER_URL=https://github.com/jenly1314/ | ||
|
||
RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ | ||
SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/ | ||
|
||
RELEASE_SIGNING_ENABLED=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
include ':split-edit-text' | ||
include ':splitedittext' | ||
include ':app' | ||
rootProject.name = "SplitEditText" |
File renamed without changes.
24 changes: 12 additions & 12 deletions
24
split-edit-text/bintray.gradle → splitedittext/bintray.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
//apply plugin: 'com.novoda.bintray-release' | ||
apply plugin: 'com.github.panpf.bintray-publish' | ||
|
||
//添加 | ||
publish { | ||
userOrg = 'jenly'//bintray.com用户名 | ||
groupId = 'com.king.view'//jcenter上的路径 | ||
artifactId = 'splitedittext'//项目名称 | ||
publishVersion = app_version.versionName//版本号 | ||
desc = 'SplitEditText for Android'//描述 | ||
website = 'https://github.com/jenly1314/SplitEditText'//网站 | ||
licences = ['MIT']//开源协议 | ||
//apply plugin: 'com.novoda.bintray-release' | ||
apply plugin: 'com.github.panpf.bintray-publish' | ||
|
||
//添加 | ||
publish { | ||
userOrg = 'jenly'//bintray.com用户名 | ||
groupId = 'com.king.view'//jcenter上的路径 | ||
artifactId = 'splitedittext'//项目名称 | ||
publishVersion = app_version.versionName//版本号 | ||
desc = 'SplitEditText for Android'//描述 | ||
website = 'https://github.com/jenly1314/SplitEditText'//网站 | ||
licences = ['MIT']//开源协议 | ||
} |
86 changes: 43 additions & 43 deletions
86
split-edit-text/build.gradle → splitedittext/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
apply plugin: 'com.android.library' | ||
apply from: 'bintray.gradle' | ||
|
||
|
||
android { | ||
compileSdkVersion build_versions.compileSdk | ||
buildToolsVersion build_versions.buildTools | ||
|
||
defaultConfig { | ||
minSdkVersion build_versions.minSdk | ||
targetSdkVersion build_versions.targetSdk | ||
versionCode app_version.versionCode | ||
versionName app_version.versionName | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles 'consumer-rules.pro' | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
warning 'InvalidPackage' | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
testImplementation "junit:junit:$versions.junit" | ||
androidTestImplementation "androidx.test.ext:junit:$versions.androidExtJunit" | ||
androidTestImplementation "androidx.test.espresso:espresso-core:$versions.espressoCore" | ||
|
||
compileOnly "androidx.appcompat:appcompat:$versions.appcompat" | ||
|
||
} | ||
|
||
apply plugin: 'com.android.library' | ||
//apply from: 'bintray.gradle' | ||
apply plugin: "com.vanniktech.maven.publish" | ||
|
||
android { | ||
compileSdkVersion build_versions.compileSdk | ||
buildToolsVersion build_versions.buildTools | ||
|
||
defaultConfig { | ||
minSdkVersion build_versions.minSdk | ||
targetSdkVersion build_versions.targetSdk | ||
versionCode app_version.versionCode | ||
versionName app_version.versionName | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles 'consumer-rules.pro' | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
warning 'InvalidPackage' | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
testImplementation "junit:junit:$versions.junit" | ||
androidTestImplementation "androidx.test.ext:junit:$versions.androidExtJunit" | ||
androidTestImplementation "androidx.test.espresso:espresso-core:$versions.espressoCore" | ||
|
||
compileOnly "androidx.appcompat:appcompat:$versions.appcompat" | ||
|
||
} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
POM_NAME=SplitEditText | ||
POM_ARTIFACT_ID=splitedittext | ||
POM_PACKAGING=aar |
40 changes: 20 additions & 20 deletions
40
split-edit-text/proguard-rules.pro → splitedittext/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Oops, something went wrong.