|
|
@ -122,14 +122,22 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void afterTextChanged(Editable edit) {
|
|
|
|
public void afterTextChanged(Editable edit) {
|
|
|
|
if (backspace != null) {
|
|
|
|
if (backspace != null)
|
|
|
|
ClipImageSpan[] spans = edit.getSpans(backspace, backspace, ClipImageSpan.class);
|
|
|
|
post(new Runnable() {
|
|
|
|
if (spans.length == 1) {
|
|
|
|
@Override
|
|
|
|
int start = edit.getSpanStart(spans[0]);
|
|
|
|
public void run() {
|
|
|
|
int end = edit.getSpanEnd(spans[0]);
|
|
|
|
try {
|
|
|
|
edit.delete(start, end);
|
|
|
|
ClipImageSpan[] spans = edit.getSpans(backspace, backspace, ClipImageSpan.class);
|
|
|
|
}
|
|
|
|
if (spans.length == 1) {
|
|
|
|
}
|
|
|
|
int start = edit.getSpanStart(spans[0]);
|
|
|
|
|
|
|
|
int end = edit.getSpanEnd(spans[0]);
|
|
|
|
|
|
|
|
edit.delete(start, end);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
post(update);
|
|
|
|
post(update);
|
|
|
|
}
|
|
|
|
}
|
|
|
|