VideoView invisible in Popupwindow?

2019-02-17 22:42发布

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,

Normal screen Popup

control

0条回答
登录 后发表回答