All Projects → VicMikhailau → Maskededittext

VicMikhailau / Maskededittext

Licence: apache-2.0
It allows you to add a mask to EditText

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Maskededittext

PhoneNumberKit
Android Kotlin library to parse and format international phone numbers. Country code picker.
Stars: ✭ 124 (-32.61%)
Mutual labels:  phone-number, mask
CHRTextFieldFormatter
Provides UITextField formatting masks. Such as phone number and credit card number formatters.
Stars: ✭ 52 (-71.74%)
Mutual labels:  phone-number, mask
Edittext Mask
The custom masks for EditText. The solution for input phone numbers, SSN, and so on for Android
Stars: ✭ 413 (+124.46%)
Mutual labels:  phone-number, mask
Shapeview
A customized shape view with shadow and transparent background supported.
Stars: ✭ 90 (-51.09%)
Mutual labels:  mask
Overlaycontroller
OverlayController easily pop your custom view and provide optional transition animation. written in swift 5.0
Stars: ✭ 94 (-48.91%)
Mutual labels:  mask
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (-34.24%)
Mutual labels:  mask
Phonenumber
A phone number library for PHP
Stars: ✭ 165 (-10.33%)
Mutual labels:  phone-number
Bufferutil
WebSocket buffer utils
Stars: ✭ 83 (-54.89%)
Mutual labels:  mask
React Native Unified Contacts
Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
Stars: ✭ 156 (-15.22%)
Mutual labels:  phone-number
Zhpopupcontroller
Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.
Stars: ✭ 1,481 (+704.89%)
Mutual labels:  mask
Masked
Mask sensitive data: replace blacklisted elements with redacted values
Stars: ✭ 103 (-44.02%)
Mutual labels:  mask
Toeicbert
TOEIC(Test of English for International Communication) solving using pytorch-pretrained-BERT model.
Stars: ✭ 95 (-48.37%)
Mutual labels:  mask
Mini phone
A fast phone number lib for Ruby (binds to Google's C++ libphonenumber)
Stars: ✭ 131 (-28.8%)
Mutual labels:  phone-number
Ng Brazil
Commons and utils in angular for brazillian apps ( pipes / validators / directives / masks )
Stars: ✭ 92 (-50%)
Mutual labels:  mask
Ngx Currency
📦 Currency mask module for Angular
Stars: ✭ 161 (-12.5%)
Mutual labels:  mask
Maska
Simple zero-dependency input mask for Vue.js and vanilla JS.
Stars: ✭ 85 (-53.8%)
Mutual labels:  mask
Tfmask
Terraform utility to mask select output from `terraform plan` and `terraform apply`
Stars: ✭ 148 (-19.57%)
Mutual labels:  mask
React Native Masked Text
A pure javascript masked text and input text component for React-Native.
Stars: ✭ 1,368 (+643.48%)
Mutual labels:  mask
Dataset
Crop/Weed Field Image Dataset
Stars: ✭ 98 (-46.74%)
Mutual labels:  mask
Openexrid
OpenEXR files able to isolate any object of a CG image with a perfect antialiazing
Stars: ✭ 113 (-38.59%)
Mutual labels:  mask

Android Arsenal

MaskedEditText

It allows you to add a mask to EditText

GIF of its use

Version

3.1.1

Installation

To use this library in your android project, just simply add the following dependency into your build.gradle

dependencies {
    implementation 'com.vicmikhailau:MaskedEditText:3.1.1'
}

Usage

Just add in xml custom MaskedEditText with attribute app:mask="your_mask" like below:

<com.vicmikhailau.maskededittext.MaskedEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:mask="your_mask" />

Or add TextChangedListener for your EditText like in following code:

val formatter = MaskedFormatter("your_mask")
mEditText.addTextChangedListener(MaskedWatcher(formatter, mEditText))

Object of MaskedWatcher class has got a weakreference to formatter object, so you must to conside this.

For create your mask you need to use following keys:

ANYTHING KEY = *
DIGIT KEY = #
UPPERCASE KEY = U
LOWERCASE KEY = L
ALPHA NUMERIC KEY = A
CHARACTER KEY = ?
HEX KEY = H

For example: you would like create a mask for a mobile number in format (029)777-77-77. Just use the simple mask "(###)###-##-##".

If you want to get text without mask just use following code:

  • For getting unmasked text for mEdtMaskedCustom: MaskedEditText just use

    val unamskedString = mEdtMaskedCustom.unMaskedText
    
  • For getting unmasked text for default EditText just use

    val text = mEditText.text.toString()
    val unmaskedString = formatter.formatString(text).unMaskedString
    

Kotlin dependency in pure Java project

Add in your build.gradle: implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" https://github.com/VicMikhailau/MaskedEditText/issues/27

Fixes and updates

Unfortunately, there is no way to devote much time to the project. Please feel free to Fork the project and add Pull requests. Thanks a lot!

Change Logs

v3.1.1

Updated Gradle and libraries.

v3.1.0

Updated Gradle and libraries.

v3.0.4

Fixes (Pull Request #26).

v3.0.3

Removed private attribute of the setMask function (Pull Request #25).

v3.0.2

Changed asserts to safe call (Pull Request #23).

v3.0.1

Moved library to androidx and kotlin.

Licence

Copyright 2016 Vic Mikhailau

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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].