@Override
                public void onDraw() {
                    int[] baseViewLocCache = new int[2];
                    if (baseView() != null) {
                        baseView().getLocationInWindow(baseViewLocCache);
                        if (getDialogImpl() != null && !baseViewLoc.isSameLoc(baseViewLocCache) && baseView().getVisibility() == VISIBLE) {
                            baseViewLoc.set(baseViewLocCache);
                            refreshMenuLoc();
                        }
                    } else {
                        if (viewTreeObserver != null) {
                            removeDrawListener(viewTreeObserver, this);
                            viewTreeObserver = null;
                            baseViewDrawListener = null;
                        }
                    }
                }
@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