How to limit EditText to input only float values in Java?

Viewed 12229

I have found answers to limit it to Integer/float in xml, I want to do it programmatically. I can set setInputType(InputType.TYPE_CLASS_NUMBER) for integer values, but what for float values?

I want them in xxxx.xxx format.

2 Answers
Related