galaxy-nexus

EditText with SpannableStringBuilder and ImageSpan doesn't works fine

我们两清 提交于 2019-11-27 11:22:42
问题 I'm trying to put emoticons inside a EditText. I've managed to do it and it works fine but I have a problem when I try to delete these emoticons from the EditText using the soft keyboard. I can't do this action with a single delete button's click. When I insert a new ImageSpan I replace an imageId for it but when I try to delete de icon I have to delete all the imageId characters before delete the image. String fileName = "emoticon1.png"; Drawable d = new BitmapDrawable(getResources(),