Hello.
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?
views:
73answers:
2That would only avoid characters not allowed in decimal numbers. Not actually a mask
marcos
2010-10-15 10:36:32
+1
A:
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.
pivotnig
2010-10-18 18:34:17