I'm working on a custom keyboard and I'm using deleteSurroundingText
to delete characters. I only have two issue with this. deleteSurroundingText
doesn't work well while deleting emojis. I need to press del
button twice in order to get rid of single emoji. And second del
key is not working with select all
option.
case Keyboard.KEYCODE_DELETE:
getCurrentInputConnection().deleteSurroundingText(1,0);
break;
This is what happens to emoji when I press try to del an emoji:
?
It turns into a question mark.
Also, when I try to del text by doing select all
nothing happens.
Any help would be appreciated