My EditText
should only accept a 3 digit number, not any other decimal numbers. I used the below regular expression to do that but this is even accepting characters like "." and "-". So how do you avoid accepting decimal values?
Java:
pattern=Pattern.compile("[0-9]{0,2}");
XML:
android:digits="0123456789"
android:inputType="number"