I have been limiting the input to my edittext like this;
InputFilter filter = new InputFilter() {
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
String output = "";
for (int i = start; i < end; i++) {
if (source.charAt(i)!='~'&&source.charAt(i)!='/') {
output += source.charAt(i);
}
}
return output;
}
};
But anyone who has used this method will know that it causes repeating characters when it is mixed with auto correct and the backspace key. To solve this I removed the auto correct bar from the keyboard like this;
Edittect.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
Now this works fine on the stock android keyboard, but the problem is on alternative keyboards(from Google play) it does not disable the auto correct, and so therefore I run into the problem of repeating characters again. Has anyone encountered this/know how to solve it?