I’d like to create programatically an EditText within this attribute:
android:inputType="number|numberSigned|numberDecimal"
In brief I’d like it to accept only numeric values. How do I have to set my EditText object?
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.
The corresponding method for inputType is
public void setInputType (int type)
So something like the below should work (untested)