# No Popup Menu with Video Displaying

**URL:** <https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023>\
**Category:** Processing for Android\
**Created:** [February 23, 2021, 1:33pm UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023 "2021-02-23T13:33:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [February 23, 2021, 1:33pm UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/1 "2021-02-23T13:33:44Z")

</div>

I have a video running without any menu code.

I also have menu code running with static images.

However, when I try to run similar menu code with video either playing or paused, the menu doesn’t display. The video uses SurfaceView and SurfaceHolder, so are these preventing the Popup Menu from showing? Othetwise I can’t pinpoint the cause.

Any ideas?

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [February 24, 2021, 6:02pm UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/2 "2021-02-24T18:02:48Z")

</div>

@paturn === what is the size of your surface layout???

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [February 25, 2021, 10:22am UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/3 "2021-02-25T10:22:32Z")

</div>

Apologies for the delay in replying, but I’ve been away from the computer for a while.  
The size is set as  
metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA\_KEY\_VIDEO\_WIDTH); and HEIGHT.

Idon’t understand it well, but the video displays OK; just no menu.

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [February 25, 2021, 5:25pm UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/4 "2021-02-25T17:25:52Z")

</div>

@paturn === this is the size for your video, not the size of your surface view

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [February 25, 2021, 5:54pm UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/5 "2021-02-25T17:54:11Z")

</div>

@akenaton  
As far as I can tell, it is the size also passed to the surface.

I’ll have to confirm or otherwise tomorrow

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [February 26, 2021, 9:36am UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/6 "2021-02-26T09:36:53Z")

</div>

Slightly wrong. The parameters are copied to video\_w video\_h and then copied to  
mySurface.setX(video\_x);  
mySurface.setY(video\_y);  
to set the position, and  
video\_width = 3 \* width / 4;  
// width is screen width; also  
video\_height = height / 4;  
are used in  
act.addContentView(mySurface, new ViewGroup.LayoutParams(video\_width, video\_height)); // act is the Activity

The video displays OK. It’s just the menu which doesn’t display.  
Do you need the code for the menu?

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [February 28, 2021, 12:13pm UTC](https://discourse.processing.org/t/no-popup-menu-with-video-displaying/28023/7 "2021-02-28T12:13:27Z")

</div>

Problem solved.

It hadn’t been fully initiated in setup.
