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

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
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