@消息界面删除逻辑补充
This commit is contained in:
parent
e2095f6e46
commit
a6004941ad
@ -37,10 +37,10 @@ public class AtTextWatcher implements TextWatcher {
|
||||
int endIndex = startIndex + nameStr.length();//字符结束的位置
|
||||
spanMap.put(model.getId(), model);
|
||||
//插入要添加的字符,此处是为了给span占位
|
||||
input.getText().insert(startIndex, "@" + nameStr + " ");
|
||||
input.getText().insert(startIndex, "@" + nameStr);
|
||||
//1、使用mEditText构造一个SpannableString
|
||||
StringBuffer atName = new StringBuffer();
|
||||
atName.append("@").append(nameStr).append(" ");
|
||||
atName.append("@").append(nameStr);
|
||||
if (spannableStringBuilder.length() > 0) {
|
||||
spannableStringBuilder.insert(startIndex, atName.toString());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user