AndroidTagGroup
AndroidTagGroup copied to clipboard
使用taggroup会持有context不释放,造成内存溢出
已经找到解决方法, 在 onDestory()中将里面的标签清空 @Override protected void onDestroy() { super.onDestroy(); tagGroup.setTags("");
}
I have the same question. tagGroup.setTags("") doesn't work.
public void setTags(String... tags) { removeAllViews(); for (final String tag : tags) { appendTag(tag); }
if (isAppendMode) {
appendInputTag();
}
}
最后又appendInputTag(),所以并没有彻底清空, 我觉得可以直接在onDestroy中调用mTagGroup.removeAllViews().