Is it possible to hide a specific keyboard button? I have an EditText and on some devices its keyboard has smiley faces while on other devices it is missing. I
From Petr Daña in a similar question... This enables autocomplete and disables all the smileys.
InputFilter filter = new InputFilter() {
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
for (int i = start; i < end; i++) {
int type = Character.getType(source.charAt(i));
//System.out.println("Type : " + type);
if (type == Character.SURROGATE || type == Character.OTHER_SYMBOL) {
return "";
}
}
return null;
}
};
mMessageEditText.setFilters(new InputFilter[]{filter});
Refer to "How to detect emoticons in EditText in android".