private ViewGroup getDecorView() {
        if (dialog != null) {
            Activity ownActivity = dialog.getOwnActivity();
            return (ViewGroup) ownActivity.getWindow().getDecorView();
        }
        Activity topActivity = ActivityLifecycleImpl.getTopActivity();
        if (topActivity != null) {
            if (topActivity instanceof DialogXFloatingWindowActivity) {
                return (ViewGroup) ((DialogXFloatingWindowActivity) topActivity).getFromActivity().getWindow().getDecorView();
            }
            return (ViewGroup) topActivity.getWindow().getDecorView();
        }
        return null;
    }
@author: Kongzue
@github: https://github.com/kongzue/
@homepage: http://kongzue.com/
@mail: myzcxhh@live.cn
@createTime: 2019/11/17 23:53
DialogX/src/main/java/com/kongzue/dialogx/util/views/ActivityScreenShotImageView.java