自己做了个护眼模式,就是一个全屏的悬浮窗,其他事件都没有问题,就单单是app的安装页面的安装按钮点不了,之后还发现开辅助功能的确定按钮也点击不了,有没有什么解决办法....
悬浮窗代码如下:
mLayoutParams = new WindowManager.LayoutParams(); mWindowManager = (WindowManager) getApplication().getSystemService(Context.WINDOW_SERVICE); mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; mLayoutParams.width = mWindowManager.getDefaultDisplay().getWidth(); mLayoutParams.height = mWindowManager.getDefaultDisplay().getHeight(); mLayoutParams.format = PixelFormat.TRANSLUCENT; mLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; LayoutInflater layoutInflater = LayoutInflater.from(getApplication()); mLinearLayout = (LinearLayout) layoutInflater.inflate(R.layout.screen_filter, null); mLinearLayout.setBackgroundColor(Color.BLACK);
一条小咸鱼