Removing Dialog margins to use it as a hamburguer menu

53 views
Skip to first unread message

Daniel Reyes

unread,
Aug 23, 2013, 5:30:05 AM8/23/13
to codenameone...@googlegroups.com, Ismael Baum, Ricardo Moya
I am currently working in an application which uses the hamburger menu navigation. We decided to implement it as a Dialog but as much as we've tried we cannot remove the dialog white margins and to be anchored left,top,down of the screen.




Any help would be highly appreciated,

Regards,

D.

Daniel Reyes

unread,
Aug 23, 2013, 6:35:34 AM8/23/13
to codenameone...@googlegroups.com, Ismael Baum, Ricardo Moya
Solved!

I was setting the UIID to the Container inside the Dialog instead of setting it to the dialog , I was able to do that with this line

dlg.getDialogComponent().setUIID("UIID");

Shai Almog

unread,
Aug 23, 2013, 1:37:08 PM8/23/13
to codenameone...@googlegroups.com, Ismael Baum, Ricardo Moya
Why aren't you using our builtin Hamburger navigation?
http://www.codenameone.com/3/post/2013/02/hamburger-sidemenu.html

It now has gestures to open the menu and other niceties that you won't benefit from if you are doing this yourselves.

Shai Almog

unread,
Aug 23, 2013, 1:38:05 PM8/23/13
to codenameone...@googlegroups.com, Ismael Baum, Ricardo Moya
Also you should have used setDialogUIID() which is specifically for that. You are relying on a bit of an implementation detail which might not work that way in the future.
Reply all
Reply to author
Forward
0 new messages