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.
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.
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?