Color on VideoView

I am trying to encode an application in which you can draw (Finger paint) a free hand on a working video in VideoView. I have two things to do separately, but not together. I can draw my paint on the blanc screen, and I can play my video on my video, which is implemented in the xml layout.

Is there a way to overlay the xml videooview View on another view that might be available for drawing?

+3
source share
2 answers

FrameLayout is designed to overlay multiple views of each other. If your image is mostly transparent, you should be able to overlay it on top of the video image in FrameLayout.

+2
source

I think your best option is to use SurfaceView instead of using VideoView. SurfaceView provides many features that VideoView does not, for example, adjusts the aspect ratio of the image to fit the screen or something else.

See the following thread for some people talking about drawing a SurfaceView:

how to draw an image on a surface

Hooray!

+1
source

Source: https://habr.com/ru/post/1764786/


All Articles