Slide 9
Slide 9 text
some things to know
we should pass WindowManager.LayoutParams
along the actual view to the window manager
service.
WindowManager.LayoutParams windowLayoutParams = new
WindowManager.LayoutParams(
CANVAS_WIDTH,
CANVAS_HEIGHT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
windowLayoutParams.gravity = Gravity.BOTTOM | Gravity.END;
with incorrect parameters, service may block touch events for lower app
in view hierarchy (because our service is on top), even keyboard will
not work.
https://developer.android.com/reference/android/view/
WindowManager.LayoutParams.html