{"id":21130067,"url":"https://github.com/pinball83/Masked-Edittext","last_synced_at":"2025-07-09T01:32:14.835Z","repository":{"id":57722103,"uuid":"49421225","full_name":"pinball83/Masked-Edittext","owner":"pinball83","description":"Android library contain custom realisation of EditText component for masking and formatting input text","archived":false,"fork":false,"pushed_at":"2018-02-12T21:36:46.000Z","size":127,"stargazers_count":599,"open_issues_count":17,"forks_count":98,"subscribers_count":16,"default_branch":"public","last_synced_at":"2023-11-07T21:33:50.641Z","etag":null,"topics":["android-library","input-validation","mask","widget"],"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/pinball83.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}},"created_at":"2016-01-11T11:19:54.000Z","updated_at":"2023-10-27T03:08:50.000Z","dependencies_parsed_at":"2022-08-29T22:31:51.821Z","dependency_job_id":null,"html_url":"https://github.com/pinball83/Masked-Edittext","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinball83%2FMasked-Edittext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinball83%2FMasked-Edittext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinball83%2FMasked-Edittext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinball83%2FMasked-Edittext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinball83","download_url":"https://codeload.github.com/pinball83/Masked-Edittext/tar.gz/refs/heads/public","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476376,"owners_count":17480215,"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-library","input-validation","mask","widget"],"created_at":"2024-11-20T05:32:14.469Z","updated_at":"2024-11-20T05:32:20.118Z","avatar_url":"https://github.com/pinball83.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# Masked-Edittext\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.pinball83/masked-edittext/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.pinball83/masked-edittext/) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Masked--Edittext-green.svg?style=true)](https://android-arsenal.com/details/1/3033) [![Android Gems](http://www.android-gems.com/badge/pinball83/Masked-Edittext.svg?branch=master)](http://www.android-gems.com/lib/pinball83/Masked-Edittext)\n \n Masked-Edittext android library EditText widget wrapper add masking and formatting input text functionality.\n \n ![Image phone number formatted input](http://g.recordit.co/ROo3bzrX7k.gif)\n \n ![Image card number formatted input](http://g.recordit.co/B8IuMTrsYi.gif)\n \n# Install\n\n## Maven\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.pinball83\u003c/groupId\u003e\n      \u003cartifactId\u003emasked-edittext\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.4\u003c/version\u003e\n      \u003ctype\u003eaar\u003c/type\u003e\n    \u003c/dependency\u003e\n## Gradle\n\n    compile 'com.github.pinball83:masked-edittext:1.0.4'\n    \n# Usage\n### Quick start\n You can choose using this widget thought declaring it in layout resource xml\n\n    \u003ccom.github.pinball83.maskededittext.MaskedEditText\n                    android:id=\"@+id/masked_edit_text\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:inputType=\"number\"\n                    app:mask=\"8 (***) *** **-**\"\n                    app:notMaskedSymbol=\"*\"\n                    app:maskIcon=\"@drawable/abc_ic_clear_mtrl_alpha\"\n                    app:maskIconColor=\"@color/colorPrimary\"\n                    /\u003e\n\nor programmatically create in source file\n\n    MaskedEditText maskedEditText = new MaskedEditText.Builder(context)\n                .mask(\"8 (***) *** **-**\")\n                .notMaskedSymbol(\"*\")\n                .icon(R.drawable.ic_account_circle)\n                .iconCallback(unmaskedText -\u003e { //Icon click callback handler })\n                .build();\n\n### Attributes\nMaskedEditText have following attributes\n\n#### XML\n    ...\n    app:mask = \"8 (***) *** **-**\"                     //mask\n    app:notMaskedSymbol = \"*\"                          //symbol for mapping allowed placeholders\n    app:replacementChar = \"#\"                          //symbol which will be replaced notMasked symbol e.g. 8 (***) *** **-** will be 8 (###) ### ##-## by default it assign to whitespace\n    app:deleteChar = \"#\"                               //symbol which will be replaced after deleting by default it assign to whitespace\n    app:format = \"[1][2][3] [4][5][6]-[7][8]-[10][9]\"  //set format of returned data input into MaskedEditText\n    app:maskIcon = \"@drawable/abc_ic_clear_mtrl_alpha\" //icon for additional functionality clean input or invoke additional screens\n    app:maskIconColor = \"@color/colorPrimary\"          //icon tint color\n    ...\n\n#### Java\nSimple instance\n\n    MaskedEditText editText = new MaskedEditText.Builder(context)\n                .mask(\"8 (***) *** **-**\")\n                .notMaskedSymbol(\"*\")\n                .build();; //set mask to \"8 (***) *** **-**\" and not masked symbol to \"*\"\n\nText setup and formatting\n\n    MaskedEditText editText = new MaskedEditText..Builder(context)\n                .mask(\"8 (***) *** **-**\")\n                .notMaskedSymbol(\"*\")\n                .format(\"[1][2][3] [4][5][6]-[7][8]-[10][9]\")//set format of returned data input into MaskedEditText\n                .build();\n    editText.setMaskedText(\"5551235567\");                     //set text into widget it will be look like 8 (555) 123 55-67\n\nInvocation method getUnmaskedText() return 8 (555) 123 55-76 we swap to last digit\n\nWidget instance with mask, icon button and callback\n\n    MaskedEditText editText = new MaskedEditText.Builder(context)\n                .mask(\"8 (***) *** **-**\")\n                .notMaskedSymbol(\"*\")\n                .icon(R.drawable.ic_account_circle)\n                .iconCallback(unmaskedText -\u003e { //Icon click callback handler })\n                .build();\n\nGetting text\n\n    maskedEditText.getUnmaskedText() //return unmasked text\n    maskedEditText.getText()         //return mask and text\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinball83%2FMasked-Edittext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinball83%2FMasked-Edittext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinball83%2FMasked-Edittext/lists"}