private void removeSpan ( Editable text , TokenImageSpan span ) { //We usually add whitespace after a token, so let's try to remove it as well if it's present int end = text . getSpanEnd ( span ) ; if ( end < text . length ( ) && text . charAt ( end ) == ' ' ) { end += 1 ; } internalEditInProgress = true ; text . delete ( text . getSpanStart ( span ) , end ) ; internalEditInProgress = false ; if ( allowCollapse && ! isFocused ( ) ) { updateCountSpan ( ) ; } }
Remove a span from the current EditText and fire the appropriate callback