Coder Social home page Coder Social logo

azimolabs / maskformatter Goto Github PK

View Code? Open in Web Editor NEW
160.0 160.0 30.0 452 KB

Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.

License: Apache License 2.0

Java 100.00%
android hacktoberfest

maskformatter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maskformatter's Issues

HTC

Hi,

Not working on HTC device. It deletes the last letter.

An EditText with an inputType of "password" should be masked.

My use case is for a user entering a social security number in the format 999-99-9999. (I added dashes in PR #6).

Right now the MaskFormatter#setInputTypeBasedOnMask resets the input-type causing the password type to be lost.

See the GIF below for a demo where the EditText has numberPassword for the inputType:

    <EditText
        android:id="@+id/ssnChars"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="text|textNoSuggestions|numberPassword"/>

problem

Multiple masking

Hello, I'm making an app for car license plates but there are multiple license plate types. How can I do them in a single edittext?

example:
99 A 99999,
99 AA 999
or 99 AAA 999

Problems with prefilled EditTexts

Hi there,

I like this lib.

So I started with a German IBAN.

The mask is like this: "AA99 9999"

Now I want to prefill the EditText with "DE".

But setting it in JAVA (after the TextChangedListener is added) and/or in XML like android:text="DE" the keyboard is wrong.

The keyboard should only show digits, but it shows alphanumeric.

Greetings,
DaRolla

New release

Would it be possible to get a new release on bintray with the latest changes from January?

Thanks

Repository jcenter deprecated

Due to the jcenter repository is deprecated we need this library in another repository in order to continue using it; it would be nice because we are happy whit it in our project.
Thank you.

Add support for hardcoded, unmodifable portions of patten

Would be great if I could define some portions of pattern unalterable for user. For example I'd like user to enter his mobile phone number but I'd also like to restrict the country, i.e. +48 for Poland. For now I need to move +48 out of the pattern, to separate TextView, but if I'd just do i.e.

 [+48] 999 9999999

and the text in [] would be shown but be unalterable/non-erasable by user, it'd be great. When user finishes I'd like get it all back, incl. +48 part.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.