what's the best way to mask a EditText on Android?
I Would like my EditText to behave like this decimal number input here.
Is there a easy way to do this?
You have to programmatically set an InputFilter on your EditText
by setFilters.
From the documentation:
InputFilters can be attached to Editables to constrain the changes that can be made to them.
You can even change the users input, for example by adding a decimal point which is what you want if I get you correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With