{"id":13610556,"url":"https://github.com/l7naive/pattern-lock","last_synced_at":"2025-04-12T22:34:15.397Z","repository":{"id":57733611,"uuid":"133628304","full_name":"l7naive/pattern-lock","owner":"l7naive","description":"Awesome pattern lock view for android written in kotlin. ","archived":false,"fork":false,"pushed_at":"2023-09-19T07:28:39.000Z","size":2715,"stargazers_count":150,"open_issues_count":3,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-07T16:44:06.353Z","etag":null,"topics":["android","gesture-lock","kotlin","pattern-lock"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l7naive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-16T07:36:32.000Z","updated_at":"2024-09-05T06:57:42.000Z","dependencies_parsed_at":"2024-08-01T19:44:08.474Z","dependency_job_id":"923d4771-c550-43b9-9446-19a1f6479ae0","html_url":"https://github.com/l7naive/pattern-lock","commit_stats":null,"previous_names":["itsxtt/pattern-lock"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l7naive%2Fpattern-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l7naive%2Fpattern-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l7naive%2Fpattern-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l7naive%2Fpattern-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l7naive","download_url":"https://codeload.github.com/l7naive/pattern-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642298,"owners_count":21138350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","gesture-lock","kotlin","pattern-lock"],"created_at":"2024-08-01T19:01:45.864Z","updated_at":"2025-04-12T22:34:14.647Z","avatar_url":"https://github.com/l7naive.png","language":"Kotlin","readme":"# Pattern Lock View \n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PatternLockView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/6988) \n\nAwesome pattern lock view for android written in kotlin.\n\n[demo](https://github.com/itsxtt/pattern-lock/tree/master/apk)\n\n## Features\n\n* easy to use\n* beautiful built-in styles\n* fully customizable\n* tiny size around 35 KB\n\n## Preview\n\n\u003cul style=\"float:left\"\u003e\n    \u003cimg src=\"./screenshots/default.gif\" width=\"150\"/\u003e\n    \u003cimg src=\"./screenshots/indicator.gif\" width=\"150\"/\u003e\n    \u003cimg src=\"./screenshots/jdstyle.gif\" width=\"150\"/\u003e\n    \u003cimg src=\"./screenshots/nine.gif\" width=\"150\"/\u003e\n\u003c/ul\u003e\n\n## Usage\n\n### Gradle\nTop level build file:\n``` gradle\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n```\nIn your application build file:\n``` gradle\nimplementation 'io.github.itsxtt:pattern-lock:0.2.0'\n```\n\n### XML\n\n``` xml\n\u003ccom.itsxtt.patternlock.PatternLockView\n    android:id=\"@+id/patternLockView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"/\u003e\n```\n\n### Kotlin\n\n``` Kotlin\npatternLockView.setOnPatternListener(object : PatternLockView.OnPatternListener {\n    override fun onStarted() {\n        super.onStarted()\n    }\n\n    override fun onProgress(ids: ArrayList\u003cInt\u003e) {\n        super.onProgress(ids)\n    }\n\n    override fun onComplete(ids: ArrayList\u003cInt\u003e): Boolean {\n        /*\n         * A return value required\n         * if the pattern is not correct and you'd like change the pattern to error state, return false\n         * otherwise return true\n         */\n        return isPatternCorrect()\n    }\n})\n```\n\n### Java\n\n``` Java\npatternLockView.setOnPatternListener(new PatternLockView.OnPatternListener() {\n    @Override\n    public void onStarted() {\n\n    }\n\n    @Override\n    public void onProgress(ArrayList\u003cInteger\u003e ids) {\n\n    }\n\n    @Override\n    public boolean onComplete(ArrayList\u003cInteger\u003e ids) {\n        /*\n         * A return value required\n         * if the pattern is not correct and you'd like change the pattern to error state, return false\n         * otherwise return true\n         */\n        return isPatternCorrect();\n    }\n});\n```\n\n### Customization\n\n#### Built-in Styles\n\n[preview](https://github.com/itsxtt/pattern-lock/blob/master/screenshots/jdstyle.gif)\n\n```\nstyle=\"@style/PatternLockView.JDStyle\"\n```\n\n\n[preview](https://github.com/itsxtt/pattern-lock/blob/master/screenshots/indicator.gif)\n\n```\nstyle=\"@style/PatternLockView.WithIndicator\"\n```\n\n#### Custom Attributes\n\nname | format | default value | description\n---|---|---|---\nplv_regularCellBackground | color\\|reference | null |\nplv_regularDotColor | color | #d8dbe9 |\nplv_regularDotRadiusRatio | float | 0.3 |\nplv_selectedCellBackground | color\\|reference | null |\nplv_selectedDotColor | color | #587bf4 |\nplv_selectedDotRadiusRatio | float | 0.3 |\nplv_errorCellBackground | color\\|reference | null |\nplv_errorDotColor | color | #ea4954 |\nplv_errorDotRadiusRatio | float | 0.3 |\nplv_lineStyle | enum | common | two values: [common](https://github.com/itsxtt/pattern-lock/blob/master/screenshots/default.gif), [indicator](https://github.com/itsxtt/pattern-lock/blob/master/screenshots/indicator.gif)\nplv_lineWidth | dimension | 2dp |  \nplv_regularLineColor | color | #587bf4 |\nplv_errorLineColor | color | #ea4954 |\nplv_spacing | dimension | 24dp |\nplv_rowCount | integer | 3 |\nplv_columnCount | integer | 3 |\nplv_errorDuration | integer | 400 | millisecond\nplv_hitAreaPaddingRatio | float | 0.2 |\nplv_indicatorSizeRatio | float | 0.2 |\n\n#### Secure Mode\n\nYou can turn the secure mode on or off via call ```enableSecureMode()``` and ```disableSecureMode()```.\n\n\n## Change Log\n\n### 0.2.0 (2021-10-08)\n* migrate to androidx\n* migrate to mavenCentral\n\n### 0.1.0 (2018-05-31)\n* first release\n\n## License\n\n    Copyright 2018 itsxtt\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n\n\n\n\n\n","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl7naive%2Fpattern-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl7naive%2Fpattern-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl7naive%2Fpattern-lock/lists"}