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