https://github.com/jenly1314/codetextfield
🔢 CodeTextField 一个使用 Compose 实现的验证码输入框
https://github.com/jenly1314/codetextfield
android captcha-input code-input code-text-field compose sms-code textfield verfication-text-field verification-code
Last synced: about 2 months ago
JSON representation
🔢 CodeTextField 一个使用 Compose 实现的验证码输入框
- Host: GitHub
- URL: https://github.com/jenly1314/codetextfield
- Owner: jenly1314
- License: mit
- Created: 2022-11-20T16:38:22.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T16:14:20.000Z (9 months ago)
- Last Synced: 2025-03-24T16:11:14.382Z (2 months ago)
- Topics: android, captcha-input, code-input, code-text-field, compose, sms-code, textfield, verfication-text-field, verification-code
- Language: Kotlin
- Homepage: https://jenly1314.github.io/CodeTextField/
- Size: 3.94 MB
- Stars: 23
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeTextField
[](https://raw.githubusercontent.com/jenly1314/CodeTextField/master/app/release/app-release.apk)
[](https://repo1.maven.org/maven2/com/github/jenly1314/codetextfield)
[](https://jitpack.io/#jenly1314/CodeTextField)
[](https://circleci.com/gh/jenly1314/CodeTextField)
[](https://android-arsenal.com/api?level=21)
[](https://opensource.org/licenses/mit-license.php)CodeTextField for Jetpack Compose;一个使用 Compose 实现的验证码输入框。
> 原生Android View实现类似的输入框可参见 [SplitEditText](https://github.com/jenly1314/SplitEditText)
## Gif 展示
> 你也可以直接下载 [演示App](https://raw.githubusercontent.com/jenly1314/CodeTextField/master/app/release/app-release.apk) 体验效果
## 引入
### Gradle:
1. 在Project的 **build.gradle** 或 **setting.gradle** 中添加远程仓库
```gradle
repositories {
//...
mavenCentral()
}
```2. 在Module的 **build.gradle** 里面添加引入依赖项
```gradle
implementation 'com.github.jenly1314:codetextfield:1.0.0'
```## 使用
### 代码示例
```kotlin
var text by remember {
mutableStateOf("")
}
// 验证码输入框
CodeTextField(value = text, onValueChange = {
text = it
})```
更多使用详情,请查看[app](app)中的源码使用示例或直接查看 [API帮助文档](https://jenly1314.github.io/CodeTextField/api/)
## 相关推荐
- [SplitEditText](https://github.com/jenly1314/SplitEditText) 一个灵活的分割可编辑框;常常应用于 **验证码输入** 、**密码输入** 等场景。
- [KingKeyboard](https://github.com/jenly1314/KingKeyboard) 一个自定义键盘,满足各种不同场景的键盘输入需求。
- [compose-component](https://github.com/jenly1314/compose-component) 一个Jetpack Compose的组件库;主要提供了一些小组件,便于快速使用。## 版本日志
#### v1.0.0:2022-11-20
* CodeTextField初始版本## 赞赏
如果您喜欢CodeTextField,或感觉CodeTextField帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:您也可以扫描下面的二维码,请作者喝杯咖啡 :coffee:
![]()
## 关于我
| 我的博客 | GitHub | Gitee | CSDN | 博客园 |
|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|
| Jenly's Blog | jenly1314 | jenly1314 | jenly121 | jenly |## 联系我
| 微信公众号 | Gmail邮箱 | QQ邮箱 | QQ群 | QQ群 |
|:-------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|
| [Jenly666](http://weixin.qq.com/r/wzpWTuPEQL4-ract92-R) | jenly1314 | jenly1314 | 20867961 | 64020761 |
![]()