8

I just wanna draw circle,rectangle or something manually on video player(while video playing) in android.Is it possible?If any code samples are much better.

Thanks.

sanjay
  • 2,590
  • 17
  • 55
  • 88

1 Answers1

1

there is already an answer to ur question:

See here

Quoted from the post:

SurfaceView probably does not work like a regular View in this regard.

Instead, do the following:

  1. Put your SurfaceView inside of a FrameLayout or RelativeLayout in your layout XML file, since both of those allow stacking of widgets on the Z-axis
  2. Move your drawing logic into a separate custom View class
  3. Add an instance of the custom View class to the layout XML file as a child of the FrameLayout or RelativeLayout, but have it appear after the SurfaceView

This will cause your custom View class to appear to float above the SurfaceView.

There is also a sample project to your need

See here

Community
  • 1
  • 1