Android VideoView: Video view is much darker in a dialog view

前端 未结 5 919
温柔的废话
温柔的废话 2020-12-13 20:18

Hi all I have a problem with embedding a video view inside a dialog view

everything works fine except that the video displayed in the Dialog is much darker that if

5条回答
  •  不思量自难忘°
    2020-12-13 20:41

    While the spatialist suggested works, the only problem there is if you ever want to setZOrderOnTop to false after setting it to true. It seems once set it is always true.

    I recently came across the same issue (videoview in a dialog) and the way I fixed it, reluctantly, was to clear FLAG_DIM_BEHIND so the video is "bright". I got the dim effect by just making my dialog fullscreen and setting the background to a 'dim color' if that makes any sense.

    More Info: With regards to the media controller, I could not find any way of bringing it to top of the dialog. I ended up creating a custom media controls layout and put it on top of the video view. It's important in this context as calling setZOrderOnTop would prevent you from putting the media controller on top of the video view.

    Hope this made sense and helps someone.

提交回复
热议问题