@Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        log("#dispatchKeyEvent: KeyCode=" + event.getKeyCode());
        if (isAttachedToWindow() && event.getAction() == KeyEvent.ACTION_UP && event.getKeyCode() == KeyEvent.KEYCODE_BACK && interceptBack) {
            if (onBackPressedListener != null && !parentDialog.get().isHide()) {
                return onBackPressedListener.onBackPressed();
            }
        }
        return super.dispatchKeyEvent(event);
    }
@author: Kongzue
@github: https://github.com/kongzue/
@homepage: http://kongzue.com/
@mail: myzcxhh@live.cn
@createTime: 2020/9/22 13:53
DialogX/src/main/java/com/kongzue/dialogx/util/views/DialogXBaseRelativeLayout.java