答案 0 :(得分:1)
尝试删除afterTextChanged()
中的跨度
public void afterTextChanged(Editable s)
{
CharacterStyle[] toBeRemovedSpans = s.getSpans(0, s.length(),
MetricAffectingSpan.class);
for (int index = 0; index < toBeRemovedSpans.length; index++)
s.removeSpan(toBeRemovedSpans[index]);
}
}