Input masks restrict data input and allow you to guide users to enter correct values. Apply formatting to your text fields, see examples. Filter out nonessential symbols (e.g. extract 0123456 from +1 (999) 012-34-56) For international phone numbers. Apply number/currency formatting. Be careful when specifying the field's android:inputType. The library uses the native Editable variable received on afterTextChange event in order to replace text efficiently. Because of that, field's inputType is actually considered when the library is trying to mutate the text. For instance, having a field with android:inputType="numeric", you cannot put spaces and dashes into the mentioned Editable variable by default. Doing so will cause an out-of-range exception when the MaskedTextChangedListener will try to reposition the cursor.

Features

  • Apply formatting to your text fields, see examples
  • Filter out nonessential symbols
  • For international phone numbers
  • Apply number/currency formatting
  • Make sure you've added Kotlin support to your project
  • Check out our wiki for quick start and further reading

Project Samples

Project Activity

See All Activity >

Categories

Code Formatters

License

MIT License

Follow Input mask for Android

Input mask for Android Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Input mask for Android!

Additional Project Details

Programming Language

Kotlin

Related Categories

Kotlin Code Formatters

Registered

2023-04-25