Closed aleporf closed 3 years ago
@Override
public void onTagsChanged(Collection<String> collection) {
handleLimit(edFieldTag.getText().length(), collection.size());
}
@Override
public void onEditingFinished() {
}
private void handleLimit(int currentTextLength, int currentTagsCount) {
int length = (maxTags <= currentTagsCount) ? currentTextLength : Integer.MAX_VALUE;
edFieldTag.setFilters(new InputFilter[]{new InputFilter.LengthFilter(length)});
}
How to set max tags inserted?