How should I override VideoView's onDraw in order for it to have transparent rounded corners?

后端 未结 3 1204
猫巷女王i
猫巷女王i 2020-12-12 02:33

Clearly using a background shape doesnt work in the case of VideoView Also, there are lots of articles how to override onDraw for ImageView and make its corners round.

3条回答
  •  臣服心动
    2020-12-12 02:57

    I think there is no easy way to do this. You could try this for example:

    • place a video window under a ImageView window
    • populate the ImageView with a solid color PNG that has a transparent shape in it
    • use a FrameLayout or RelativeLayout to hold the two views as they allow views to overlap each other easily

提交回复
热议问题