@Override
    public void restartDialog() {
        if (getDialogView() != null) {
            if (baseViewDrawListener != null) {
                if (viewTreeObserver != null) {
                    removeDrawListener(viewTreeObserver, baseViewDrawListener);
                } else {
                    if (baseView() != null) {
                        removeDrawListener(baseView().getViewTreeObserver(), baseViewDrawListener);
                    }
                }
                baseViewDrawListener = null;
            }
            dismiss(getDialogView());
            isShow = false;
        }
        if (getDialogImpl().boxCustom != null) {
            getDialogImpl().boxCustom.removeAllViews();
        }
        show();
    }
@author: Kongzue
@github: https://github.com/kongzue/
@homepage: http://kongzue.com/
@mail: myzcxhh@live.cn
@createTime: 2021/8/18 14:27
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopMenu.java