Home > Enterprise >  Android videoview - strange overlay when removing fragment or setting videoview to invisible/gone
Android videoview - strange overlay when removing fragment or setting videoview to invisible/gone

Time:09-20

I added the videoview component to our design, where we play the video, which works fine. When we transition from the fragment holding the videoview or if i put videoview to INVISIBLE or gone then then just before the component is removed in the same place holder I see strange overlay blueish like just like you would turn off old tv :)

Something like when the component is being removed android draws some strange quirk before removing.

Anyone came across the same ? Is there a solution?

Update: the place holder while being removed actually shows the desktop of android with all the icons, like you can see trough our app?

BR,

CodePudding user response:

SurfaceView (and VideoView as subclass) is placed behind the window by default. That makes it see trough

So you should call: videoView.setZOrderOnTop(true) if you want to place it on top (to make it non transparent).

  • Related