VideoView invisible in Popupwindow?

浪子不回头ぞ 提交于 2019-12-01 02:45:23

问题


My target: I am trying to play a video when tapping on one of the item on the screen while still staying on that screen.

So I resort to PopupWindow but somehow VideoView doesn't show up in the popup.

I can display popup just fine but the VideoView doesn't(in fact, it's not invisible but rather freeze that section of the screen). If you look at the second and third screen, you will see that the invisible area isn't exactly rectangular. That's because I am animating the popupwindow.

I checked the VideoView itself inside another Activity and it plays nicely. I tested this with Nexus One and Galaxy S, both display the same result.

Quick search on StackOverflow shows this question : android video, hear sound but no video which leads to Android not playing Video .mp4 and both doesn't work for me.

Also, as you can see on the third screen, the MediaController doesn't exactly attach itself to the video or popupwindow but the Activity instead.

Here's the screens,

来源:https://stackoverflow.com/questions/3889526/videoview-invisible-in-popupwindow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!