Skip to main content

Posts

Showing posts with the label limit inpu type

Restrict Edittext input content using Input Filters in ANDROID

InputFilter filter = new InputFilter() { public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { // TODO Auto-generated method stub for (int i = start; i Here the filters will check whether the input content has only characters from 'a' to 'z'. same way use the condition below to have characters from'a' to 'z' and '0' to '9' and avoid special characters. Character.isLetterOrDigit(source.charAt(i))