AndroidTagGroup icon indicating copy to clipboard operation
AndroidTagGroup copied to clipboard

使用taggroup会持有context不释放,造成内存溢出

Open lucheng0522 opened this issue 8 years ago • 2 comments

已经找到解决方法, 在 onDestory()中将里面的标签清空 @Override protected void onDestroy() { super.onDestroy(); tagGroup.setTags("");

}

lucheng0522 avatar Aug 03 '16 01:08 lucheng0522

I have the same question. tagGroup.setTags("") doesn't work.

LiuJQ avatar Aug 24 '16 06:08 LiuJQ

public void setTags(String... tags) { removeAllViews(); for (final String tag : tags) { appendTag(tag); }

    if (isAppendMode) {
        appendInputTag();
    }
}

最后又appendInputTag(),所以并没有彻底清空, 我觉得可以直接在onDestroy中调用mTagGroup.removeAllViews().

wpq2014 avatar Jul 19 '17 10:07 wpq2014