我正在我的应用程序中创建一个功能,在屏幕上显示一个带有文本的覆盖窗口,当它出现时,我尝试触摸它实际触摸到的那个窗口在那个窗口后面我需要使那个窗口可触摸,我应该使用哪些参数?这是我的代码
windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
LayoutInflater screenNotificationInflater = (LayoutInflater) getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
layOverTopviewNotification = screenNotificationInflater.inflate(R.layout.layout_notification, null);
TextView layOverText = (TextView) layOverTopviewNotification.findViewById(R.id.notification_layout);
layOverText.setText(athkarString[completed]);
params = new WindowManager.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
PixelFormat.TRANSLUCENT);
params.x = 0;
params.y = 0;
params.gravity = Gravity.TOP;
windowManager.addView(layOverTopviewNotification, params);