From a6004941ad0f9d5009082a223f3653584aa166e3 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 8 Oct 2022 18:26:05 +0800 Subject: [PATCH] =?UTF-8?q?@=E6=B6=88=E6=81=AF=E7=95=8C=E9=9D=A2=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E9=80=BB=E8=BE=91=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/views/weight/AtTextWatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/weight/AtTextWatcher.java b/common/src/main/java/com/yunbao/common/views/weight/AtTextWatcher.java index e0a8807ba..b09afcd98 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/AtTextWatcher.java +++ b/common/src/main/java/com/yunbao/common/views/weight/AtTextWatcher.java @@ -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 {