{"id":38055664,"url":"https://github.com/daemon369/android-verification-code-view","last_synced_at":"2026-01-16T20:24:22.625Z","repository":{"id":57732960,"uuid":"193717632","full_name":"daemon369/android-verification-code-view","owner":"daemon369","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-21T11:04:26.000Z","size":211,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-02T07:40:00.955Z","etag":null,"topics":["android","library","view"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daemon369.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-25T13:53:52.000Z","updated_at":"2021-12-21T07:55:09.000Z","dependencies_parsed_at":"2022-09-26T22:11:10.849Z","dependency_job_id":null,"html_url":"https://github.com/daemon369/android-verification-code-view","commit_stats":null,"previous_names":["daemon369/verificationcodeview"],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/daemon369/android-verification-code-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-verification-code-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-verification-code-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-verification-code-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-verification-code-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daemon369","download_url":"https://codeload.github.com/daemon369/android-verification-code-view/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemon369%2Fandroid-verification-code-view/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","library","view"],"created_at":"2026-01-16T20:24:22.466Z","updated_at":"2026-01-16T20:24:22.593Z","avatar_url":"https://github.com/daemon369.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VerificationCodeView\n\n----\n\n## 使用方法\n\n### 1. 项目依赖\n\n项目根目录下`build.gradle`中加入：\n\n```\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\n添加依赖：\n\n```\ndependencies {\n    implementation 'io.github.daemon369:verification-code-view:x.y.z'\n}\n```\n\n将其中的`x`、`y`、`z`替换为真实版本号\n\n可以在中央仓库\u003chttps://mvnrepository.com/artifact/io.github.daemon369/verification-code-view\u003e获取最新版本号\n\n## 2. 使用\n\n### 1) 使用XML\n\n```xml\n\u003cme.daemon.verificationcode.VerificationCodeView\n    android:layout_width=\"300dp\"\n    android:layout_height=\"100dp\"\n    android:background=\"#ff0000\"\n    app:daemon_vc_capacity=\"8\"\n    app:daemon_vc_cursorBlink=\"true\"\n    app:daemon_vc_cursorBlinkInterval=\"300\"\n    app:daemon_vc_cursorColor=\"#ab00ea\"\n    app:daemon_vc_cursorEnabled=\"true\"\n    app:daemon_vc_cursorHeight=\"15dp\"\n    app:daemon_vc_cursorWidth=\"5dp\"\n    app:daemon_vc_gridBackground=\"@drawable/shape_circle\"\n    app:daemon_vc_gridDividerSize=\"15dp\"\n    app:daemon_vc_textColor=\"@android:color/holo_green_light\"\n    app:daemon_vc_textSize=\"30sp\" /\u003e\n```\n\n### 2) 代码方式\n\n```kotlin\nimport kotlinx.android.synthetic.main.activity_main.*\nimport me.daemon.verificationcode.VerificationCodeView\nimport me.daemon.view.common.dp2px\n\nclass MainActivity : AppCompatActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        vc.capacity = 6\n        vc.gridDividerSize = 10\n        vc.gridBackground = ColorDrawable(Color.YELLOW)\n        vc.textSize = dp2px(30f)\n        vc.textColor = Color.CYAN\n        vc.listener = VerificationCodeView.Listener { view, content, isFullFilled -\u003e\n            i(\n                MainActivity::class.java.name,\n                \"on verification code view changed: $view, $content, $isFullFilled\"\n            )\n        }\n    }\n}\n```\n\n## 属性\n\n|  XML属性                        | 版本    | 说明                                                  |\n| ------------------------------- | ------ | ---------------------------------------------------- |\n| `daemon_vc_capacity`            |        | 验证码长度，默认为4                                     |\n| `daemon_vc_gridBackground`      |        | 验证码输入框背景                                        |\n| `daemon_vc_gridDividerSize`     |        | 验证码输入框间隔                                        |\n| `daemon_vc_textSize`            |        | 验证码文本字体大小                                      |\n| `daemon_vc_textColor`           |        | 验证码文本字体颜色                                      |\n| `daemon_vc_cursorEnabled`       | 0.0.3+ | 是否显示光标，默认不显示                                 |\n| `daemon_vc_cursorWidth`         | 0.0.3+ | 光标宽度，默认0不显示                                   |\n| `daemon_vc_cursorHeight`        | 0.0.3+ | 光标高度，默认0不显示                                   |\n| `daemon_vc_cursorColor`         | 0.0.3+ | 光标颜色，默认黑色                                      |\n| `daemon_vc_cursorBlink`         | 0.0.3+ | 光标闪烁，默认开启闪烁，daemon_vc_cursorEnabled为true有效 |\n| `daemon_vc_cursorBlinkInterval` | 0.0.3+ | 光标闪烁时间间隔，毫秒为单位，默认500ms                   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaemon369%2Fandroid-verification-code-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaemon369%2Fandroid-verification-code-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaemon369%2Fandroid-verification-code-view/lists"}