6

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

Community
  • 1
  • 1
RobGThai
  • 5,937
  • 8
  • 41
  • 59
  • 1
    I will be rather surprised if you could play a video in a `PopupWindow`. Try using a dialog-themed activity instead. – CommonsWare Oct 08 '10 at 11:53
  • Thank you for your comment :) I have the activity playing video now. However I am still having problem with the "hole" in the popup activity :( Any of your books cover this stuff? Looking to get one when my Kindle shipped here. – RobGThai Oct 11 '10 at 10:01
  • Hi. am running out of the same problem. Did u find out any solutions?. It could be really helpful. – Andro Selva Apr 30 '12 at 14:06
  • You could try using FrameLayout as a root, not sure if works. I switched to using another view instead of popupwindow at the time. – RobGThai May 02 '12 at 03:56
  • Could you try this, https://dl.dropbox.com/u/68130108/PopupVideo.apk. If it is ok i will send to you source. – Talha Nov 29 '12 at 13:51
  • @RobGThai Hey did you solved this problem? I am having same issue. I want to show VideoView inside PopupWindow but its invisible. – Nitesh Kumar Oct 20 '15 at 18:53

0 Answers0