1. 表情框,点击表情出现,内存泄漏
将单例类GlobalOnItemClickManagerUtils ,传入Application context.
GlobalOnItemClickManagerUtils globalOnItemClickManager = GlobalOnItemClickManagerUtils.getInstance(BaseApplication.get());
globalOnItemClickManager.attachToEditText(etContent);
2. 表情框,绑定输入框,内存泄漏
绑定的输入框对象采用弱引用处理
public void attachToEditText(EditText editText) {
mViewReference = new WeakReference<>(editText);
if (mViewReference.get() != null) {
mEditText = mViewReference.get();
}
}