sidebar menu and mediaplayer layout issue

31 views
Skip to first unread message

josh...@filmexchangenetwork.com

unread,
Jan 26, 2015, 7:44:55 PM1/26/15
to codenameone...@googlegroups.com
Hello,

I'm new to CN1 and this forum.   I just implemented the "hamburger" menu and its working well.  However I have a problem that I haven't seen posted here. 

I have a form containing a MediaPlayer.   I set the Form layout to BorderLayout and the MediaPlayer to BorderLayout.CENTER.

When I first show the form, the MediaPlayer shows up fine visually.   As soon as I open the side menu, it messes up the layout and the MediaPlayer disappears.   Doesn't matter what I do at that point, the Media Player will not display until I go back to the beginning and show the form again. 

When the media player is no longer visible, I can still hear the audio.

I think the menu is disrupting the Border Layout in some way. Is there any way to avoid this?   Perhaps make the menu overlap (which I tried and could not sort out). 

NetBeans & Simulator (targeting iOS and Android)

Thanks,
Josh




Shai Almog

unread,
Jan 27, 2015, 1:38:51 AM1/27/15
to codenameone...@googlegroups.com, josh...@filmexchangenetwork.com
Hi,
just to be clear... This is not just happening on an iOS device but on Android and the simulator too?

josh...@filmexchangenetwork.com

unread,
Jan 28, 2015, 10:48:10 AM1/28/15
to codenameone...@googlegroups.com, josh...@filmexchangenetwork.com
Shai,

Thanks for your help via email.  I punted on the facebook style menu because it caused unmanageable behavior by the peer MediaPlayer object.   


I've got it working now by create a top level Container of type TableLayout.   I create nested containers at 80% width for the media, and 20% width for the menu.  Working great now!

Josh
Reply all
Reply to author
Forward
0 new messages