Question 1 : Do you need to support transparent transmission of floating window events?
Solved :
支持透传:pparams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
不支持透传:pparams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
Question 2 : Is the layout size of the window View controlled by the xml layout file or by LayoutParams?
Note : The xml layout file cannot control the width and height of the layout, and the final control is determined by the width and height set by LayoutParams.
For example: xml defines a width and height of 100x100, and LayoutParams.width=LayoutParams.height=50, then the final display effect is 50
For example: xml defines a width and height of 100x100, and LayoutParams.width=LayoutParams.height= LayoutParams.WRAP_CONTENT then the display effect is 100x100