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
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
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