Specifically using the code below, is there a way to modify it so that the activity under this newly created view does not receive any gestures?
View v1 = new View(this);
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
1000,
50,
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.OPAQUE);
params.gravity = Gravity.BOTTOM;
WindowManager wm = (WindowManager) this.getSystemService(Context.WINDOW_SERVICE);
wm.addView(v1, params);
Add an
onTouchEventmethod to the view with top position then return true. True will tell the event bubbling that the event was consumed therefore prevent event from bubbling to other views.For
v1you would do an import:Then set the onTouchListener: