looked a lot at a similar question without luck ...
I am trying to find the right way to play a video (half screen, which can also be full screen when necessary) with a media controller. It is assumed that the video should be placed on top of the built-in controls, and both the video and the built-in controls can receive touch events (both clickable and the Facebook messenger icon).
Currently I am doing: I am launching a transparent action, and I am playing the video inside VideoView, and I set its layout parameters and activity layout parameters to take half the screen. The other half is its own screen. I set the window:
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY)
What happens is that I see a video playing on VideoView , but I can’t touch and use its media controller (play, pause, etc.) , but I can see my own screen, which I can touch!
I tried different flags that allow the media controller, but then VideoViewcompletely absorb touch events. This means that now I can not touch the half that is behind it. .
VideoView is at the top of its own screen - both can handle touch events
I thought, perhaps using a dialog box or a popup, but could not find what says Dialog can receive touch events, while the native screen can also receive touch events .
.
!:)