{"id":13644557,"url":"https://github.com/vacxe/PhoneMask","last_synced_at":"2025-04-21T10:33:30.820Z","repository":{"id":84837556,"uuid":"91551243","full_name":"Vacxe/PhoneMask","owner":"Vacxe","description":"Android library for EditText. Easy way for add phone readability in your project.","archived":false,"fork":false,"pushed_at":"2018-02-13T11:22:10.000Z","size":155,"stargazers_count":34,"open_issues_count":6,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T18:51:10.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Vacxe.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}},"created_at":"2017-05-17T08:18:04.000Z","updated_at":"2025-02-18T15:08:09.000Z","dependencies_parsed_at":"2023-04-29T20:06:48.355Z","dependency_job_id":null,"html_url":"https://github.com/Vacxe/PhoneMask","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vacxe%2FPhoneMask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vacxe%2FPhoneMask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vacxe%2FPhoneMask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vacxe%2FPhoneMask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vacxe","download_url":"https://codeload.github.com/Vacxe/PhoneMask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250040492,"owners_count":21365115,"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":[],"created_at":"2024-08-02T01:02:07.449Z","updated_at":"2025-04-21T10:33:30.294Z","avatar_url":"https://github.com/Vacxe.png","language":"Java","readme":"# PhoneMask\nPhoneMask is lightweight android library for EditText formatting. Easy way for add phone readability in your project.\n\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PhoneMask-green.svg?style=true)](https://android-arsenal.com/details/1/5770)\n\n## How to use it\nIn Kotlin Just use PhoneMaskManager class\n```kotlin\n PhoneMaskManager()\n                .withMask(\" (###) ###-##-##\")\n                .withRegion(\"+7\")\n                .withValueListener(object : ValueListener{\n                    override fun onPhoneChanged(phone: String) {\n                       \n                    }\n                })\n                .bindTo((findViewById(R.id.text_edit_text) as EditText))\n```\n\nYou can also use this in Java,  \n```java\n new PhoneMaskManager()\n                .withMask(\" (###) ###-##\")\n                .withRegion(\"+255\")\n                .bindTo((EditText)findViewById(R.id.text_edit_text))\n```\n\n### About methods\n#### Init methods\n- **withMask** \n(required field)\nInit your mask format. Use `#` symbol by default\n\n- **withMaskSymbol** \n(optional field)\nChanging default symbol mask\n\n- **withRegion**\n(optional field)\nInit your region\n\n- **withValueListener**\n(optional field)\nIf you want to receive callback from EditText just add ValueListener, and you receive phone string in clear format \n(For example: +70009199191)\n\n- **withOnFocusChangeListener**\n(optional field)\nIf you want to set OnFocusChangeListener for EditText use this method\n\n- **bindTo** \n(required calling)\nAfrer setup just call this method for binding to `EditText`\n\n#### Get methods\n- **getPhone** \nReturn phone in clear format (For example: +70009199191)\n\n### Download\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.vacxe\u003c/groupId\u003e\n  \u003cartifactId\u003ephonemask\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.5\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\nor Gradle:\n```groovy\n\nrepositories {\n    jcenter()\n}\n\ndependencies {\n    compile 'com.github.vacxe:phonemask:1.0.5'\n}\n```\n","funding_links":[],"categories":["EditText"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvacxe%2FPhoneMask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvacxe%2FPhoneMask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvacxe%2FPhoneMask/lists"}