@Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        dialogXFloatingWindowActivity = new WeakReference<>(this);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_dialogx_empty);

        int fromActivityUiStatus = getIntent().getIntExtra("fromActivityUiStatus", 0);
        if (fromActivityUiStatus == 0) {
            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
        } else {
            getWindow().getDecorView().setSystemUiVisibility(fromActivityUiStatus | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
        }

        setFromActivityHashCode(getIntent().getIntExtra("from", 0));
        String dialogXKey;
        ActivityRunnable activityRunnable = BaseDialog.getActivityRunnable(dialogXKey = getIntent().getStringExtra("dialogXKey"));
        if (activityRunnable == null) {
            finish();
        } else {
            shownDialogXList.add(dialogXKey);
            activityRunnable.run(this);
        }

        getWindow().getDecorView().setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                if (event.getAction() != MotionEvent.ACTION_CANCEL && getFromActivity() != null) {
                    if (getFromActivity() != null && !(getFromActivity() instanceof DialogXFloatingWindowActivity)) {
                        return getFromActivity().dispatchTouchEvent(event);
                    }
                }
                return false;
            }
        });
    }
@author: Kongzue
@github: https://github.com/kongzue/
@homepage: http://kongzue.com/
@mail: myzcxhh@live.cn
@createTime: 2021/12/20 14:58
DialogX/src/main/java/com/kongzue/dialogx/util/DialogXFloatingWindowActivity.java