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.
there is already an answer to ur question:
See here
Quoted from the post:
SurfaceView
probably does not work like a regularView
in this regard.Instead, do the following:
- Put your
SurfaceView
inside of aFrameLayout
orRelativeLayout
in your layout XML file, since both of those allow stacking of widgets on the Z-axis- Move your drawing logic into a separate custom
View
class- Add an instance of the custom View class to the layout XML file as a child of the
FrameLayout
orRelativeLayout
, but have it appear after theSurfaceView
This will cause your custom
View
class to appear to float above theSurfaceView
.
There is also a sample project to your need
See here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With