private void submitItemAtPosition(int position) {
CharSequence text = getFilter().convertResultToString(
getAdapter().getItem(position));
if (TextUtils.isEmpty(text)) {
return;
}
clearComposingText();
int end = getSelectionEnd();
int start = mTokenizer.findTokenStart(getText(), end);
Editable editable = getText();
QwertyKeyListener.markAsReplaced(editable, start, end, "");
CharSequence chip = createChip(text, false);
if (chip != null && start >= 0 && end >= 0) {
editable.replace(start, end, chip);
}
sanitizeBetween();
}
ChipEditTextView.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:android-chip-edittextview
作者:
评论列表
文章目录