street = (EditText) findViewById(R.id.street);
InputFilter filter = new InputFilter() {
public CharSequence filter(CharSequence source, int start, int end,Spanned dest, int dstart, int dend) {
for (int i = start; i < end; i++) {
if (!Character.isLetterOrDigit(source.charAt(i)) || !Character.isSpaceChar(source.charAt(i))) {
return "";
}
}
return null;
}
};
street.setFilters(new InputFilter[] { filter });
my edittext is able to filter character & number on the virtual keyboard but not taking the space character.. plz help