How to draw a circle, a rectangle manually on an Android video player

I just want to draw a circle, rectangle or something manually on the video player (when playing the video) in android. Is it possible? If any code examples are much better.

Thanks.

+8
android
source share
1 answer

already have an answer to ur question:

Look here

Quote from the post:

SurfaceView probably doesn't work like a normal View in this regard.

Instead, follow these steps:

  • Place your SurfaceView inside a FrameLayout or RelativeLayout in your layout XML file, since both of them allow you to stack widgets on the Z axis
  • Move the drawing logic to a separate custom View class
  • Add an instance of a custom class view to the XML layout file as a child of FrameLayout or RelativeLayout , but if it appears after SurfaceView

This will cause your custom View class to float over SurfaceView .

There is also a sample project of your choice.

Look here

+1
source share

All Articles