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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you are looking for
in the xml file and
in the java source file.
TYPE_NUMBER_FLAG_DECIMAL is a flag of TYPE_CLASS_NUMBER and allows decimal inputs.
For more information see this
In another way you can test the input value using