{"id":13848149,"url":"https://github.com/AzimoLabs/MaskFormatter","last_synced_at":"2025-07-12T11:33:40.918Z","repository":{"id":76191301,"uuid":"54022277","full_name":"AzimoLabs/MaskFormatter","owner":"AzimoLabs","description":"Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.","archived":false,"fork":false,"pushed_at":"2021-04-07T08:23:11.000Z","size":452,"stargazers_count":160,"open_issues_count":6,"forks_count":30,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-05T19:35:25.649Z","etag":null,"topics":["android","hacktoberfest"],"latest_commit_sha":null,"homepage":"","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/AzimoLabs.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":"2016-03-16T10:24:36.000Z","updated_at":"2024-03-01T13:04:54.000Z","dependencies_parsed_at":"2023-03-11T21:39:39.831Z","dependency_job_id":null,"html_url":"https://github.com/AzimoLabs/MaskFormatter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzimoLabs%2FMaskFormatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzimoLabs%2FMaskFormatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzimoLabs%2FMaskFormatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzimoLabs%2FMaskFormatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AzimoLabs","download_url":"https://codeload.github.com/AzimoLabs/MaskFormatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225820303,"owners_count":17529138,"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","hacktoberfest"],"created_at":"2024-08-04T19:00:43.494Z","updated_at":"2024-11-21T23:31:03.442Z","avatar_url":"https://github.com/AzimoLabs.png","language":"Java","readme":"# MaskFormatter\nMaskFormatter adds mask functionality to your EditText. It will prevent user from inserting not allowed signs, and format input as well.\n\n![MaskFormatter](https://raw.githubusercontent.com/AzimoLabs/MaskFormatter/master/art/screenshot.png)\n\n![Animated](https://raw.githubusercontent.com/AzimoLabs/MaskFormatter/master/art/animated.gif)\n\nMask should be built from characters listed below (java regex associated to character given after colon):\n\n```\n'9': '[0-9]',\n'8': '[0-8]',\n'7': '[0-7]',\n'6': '[0-6]',\n'5': '[0-5]',\n'4': '[0-4]',\n'3': '[0-3]',\n'2': '[0-2]',\n'1': '[0-1]',\n'0': '[0]',\n\n'*': '.',\n'W': '\\W',\n'd': '\\d',\n'D': '\\D',\n's': '\\s',\n'S': '\\S',\n\n'A': '[A-Z]',\n'a': '[a-z]',\n'Z': '[A-ZÇÀÁÂÃÈÉÊẼÌÍÎĨÒÓÔÕÙÚÛŨ]',\n'z': '[a-zçáàãâéèêẽíìĩîóòôõúùũüû]',\n'@': '[a-zA-Z]',\n'#': '[a-zA-ZçáàãâéèêẽíìĩîóòôõúùũüûÇÀÁÂÃÈÉÊẼÌÍÎĨÒÓÔÕÙÚÛŨ]',\n\n'%': '[A-Z0-9]',\n'w': '[a-zA-Z0-9]'\n```\n\n# Usage\nIn your `build.gradle`:\n\n```gradle\n\ndependencies {\n    compile 'com.azimolabs.maskformatter:maskformatter:0.2'\n}\n\n```\n\nLibrary is distributed via jCenter Maven repository. Make sure that you have it in your root gradle config:\n\n```gradle\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n```\n\nThen you can use it like this:\n\n```java\npublic MainActivity extends Activity {\n\n     private static final IBAN_MASK = \"AA 99 9999 AAAA wwww wwww wwww\";\n\n     @Override\n     public void onCreate(Bundle savedInstanceState) {\n          super.onCreate(savedInstanceState);\n          setContentView(R.layout.sample_layout);\n\n          EditText ibanEditText = (EditText) findViewById(R.id.etIban);\n          MaskFormatter ibanMaskFormatter = new MaskFormatter(IBAN_MASK, ibanEditText);\n          ibanEditText.addTextChangedListener(ibanMaskFormatter);\n     }\n\n}\n```\n\nAnd make sure that you disabled suggestions from used EditText:\n\n```xml\n\u003cEditText\n    android:id=\"@+id/etIban\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:inputType=\"text|textNoSuggestions\" /\u003e\n```\n\n# License\n\n```\n\tCopyright (C) 2016 AzimoLabs\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# Towards financial services available to all\nWe’re working throughout the company to create faster, cheaper, and more available financial services all over the world, and here are some of the techniques that we’re utilizing. There’s still a long way ahead of us, and if you’d like to be part of that journey, check out our [careers page](https://bit.ly/3vajnu6).\n","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzimoLabs%2FMaskFormatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAzimoLabs%2FMaskFormatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzimoLabs%2FMaskFormatter/lists"}