Remove whole Spannable with backspace
I have a chat application which offers the possibility to add emoticons to the text. I have a problem with the EditText field. The emoticon images show up but if I press on the normal keyboard the backspace button, the text which I was changing to an emoticons picture shows up and I have to remove several characters until the picture goes away. I am using Spannable to do this. I want the whole smilie go away if the user presses one time backspace. Here the code I am using: // This is in the keyclicked listener { ... smilie = "(angel)"; break; ... int cursorPosition = content.getSelectionStart(