I have an EditText input that I would like to only allow numbers 1 – 28 (int’s) to be enterable. How would I do this?
I looked on the android site in regards to android:inputType but could not find anything that fits (to customize).
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.
You should just use a NumberPicker instead which allows you to specify min and max.
If you want, you can hide the + and – buttons and then the user will only see the EditText and it will meet your requirements.
For the number picker to appear on the screen, you must have called setMinValue/setMaxValue on it.