pinball83 / Masked Edittext
Licence: apache-2.0
Android library contain custom realisation of EditText component for masking and formatting input text
Stars: ✭ 592
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Masked Edittext
Maskara
A simple way to format text fields without getting affected by input filters
Stars: ✭ 515 (-13.01%)
Mutual labels: widget, mask
Nativescript Masked Text Field
#️⃣ A NativeScript Masked Text Field widget
Stars: ✭ 24 (-95.95%)
Mutual labels: widget, mask
yii2-number
A number format mask control and input for Yii2 Framework
Stars: ✭ 22 (-96.28%)
Mutual labels: widget, mask
Dividerdrawable
Help to layout and draw dividers on android views.
Stars: ✭ 464 (-21.62%)
Mutual labels: widget
Switchbutton
A cute widget of Switch Button for you to create beautiful and friendly UI.
Stars: ✭ 4,531 (+665.37%)
Mutual labels: widget
Jquery Mask Plugin
A jQuery Plugin to make masks on form fields and HTML elements.
Stars: ✭ 4,534 (+665.88%)
Mutual labels: mask
Pinterestsegment
A Pinterest-like segment control with masking animation.
Stars: ✭ 560 (-5.41%)
Mutual labels: widget
Lottie Flutter
Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
Stars: ✭ 444 (-25%)
Mutual labels: widget
Nextcloud Notes
✎ Android client for Nextcloud Notes app.
Stars: ✭ 529 (-10.64%)
Mutual labels: widget
Material Viewpagerindicator
Dot-based Android ViewPager indicator with Material Design animations.
Stars: ✭ 511 (-13.68%)
Mutual labels: widget
React Event Timeline
A responsive event timeline in React.js
Stars: ✭ 504 (-14.86%)
Mutual labels: widget
Radarchartview
Android view (widget) for rendering radial diagrams
Stars: ✭ 488 (-17.57%)
Mutual labels: widget
Nanopop
🍦 Minimalistic, small, positioning engine. Build for high-performance, minimal footprint and maximum control over positioning behavior.
Stars: ✭ 520 (-12.16%)
Mutual labels: widget
Albert pytorch
A Lite Bert For Self-Supervised Learning Language Representations
Stars: ✭ 539 (-8.95%)
Mutual labels: mask
Web3modal
A single Web3 / Ethereum provider solution for all Wallets
Stars: ✭ 515 (-13.01%)
Mutual labels: widget
Flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 455 (-23.14%)
Mutual labels: widget
Vue Grid Layout
A draggable and resizable grid layout, for Vue.js.
Stars: ✭ 5,170 (+773.31%)
Mutual labels: widget
Masked-Edittext
Masked-Edittext android library EditText widget wrapper add masking and formatting input text functionality.
Install
Maven
<dependency>
<groupId>com.github.pinball83</groupId>
<artifactId>masked-edittext</artifactId>
<version>1.0.4</version>
<type>aar</type>
</dependency>
Gradle
compile 'com.github.pinball83:masked-edittext:1.0.4'
Usage
Quick start
You can choose using this widget thought declaring it in layout resource xml
<com.github.pinball83.maskededittext.MaskedEditText
android:id="@+id/masked_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
app:mask="8 (***) *** **-**"
app:notMaskedSymbol="*"
app:maskIcon="@drawable/abc_ic_clear_mtrl_alpha"
app:maskIconColor="@color/colorPrimary"
/>
or programmatically create in source file
MaskedEditText maskedEditText = new MaskedEditText.Builder(context)
.mask("8 (***) *** **-**")
.notMaskedSymbol("*")
.icon(R.drawable.ic_account_circle)
.iconCallback(unmaskedText -> { //Icon click callback handler })
.build();
Attributes
MaskedEditText have following attributes
XML
...
app:mask = "8 (***) *** **-**" //mask
app:notMaskedSymbol = "*" //symbol for mapping allowed placeholders
app:replacementChar = "#" //symbol which will be replaced notMasked symbol e.g. 8 (***) *** **-** will be 8 (###) ### ##-## by default it assign to whitespace
app:deleteChar = "#" //symbol which will be replaced after deleting by default it assign to whitespace
app:format = "[1][2][3] [4][5][6]-[7][8]-[10][9]" //set format of returned data input into MaskedEditText
app:maskIcon = "@drawable/abc_ic_clear_mtrl_alpha" //icon for additional functionality clean input or invoke additional screens
app:maskIconColor = "@color/colorPrimary" //icon tint color
...
Java
Simple instance
MaskedEditText editText = new MaskedEditText.Builder(context)
.mask("8 (***) *** **-**")
.notMaskedSymbol("*")
.build();; //set mask to "8 (***) *** **-**" and not masked symbol to "*"
Text setup and formatting
MaskedEditText editText = new MaskedEditText..Builder(context)
.mask("8 (***) *** **-**")
.notMaskedSymbol("*")
.format("[1][2][3] [4][5][6]-[7][8]-[10][9]")//set format of returned data input into MaskedEditText
.build();
editText.setMaskedText("5551235567"); //set text into widget it will be look like 8 (555) 123 55-67
Invocation method getUnmaskedText() return 8 (555) 123 55-76 we swap to last digit
Widget instance with mask, icon button and callback
MaskedEditText editText = new MaskedEditText.Builder(context)
.mask("8 (***) *** **-**")
.notMaskedSymbol("*")
.icon(R.drawable.ic_account_circle)
.iconCallback(unmaskedText -> { //Icon click callback handler })
.build();
Getting text
maskedEditText.getUnmaskedText() //return unmasked text
maskedEditText.getText() //return mask and text
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].