Menu substitute with the same button

10 views
Skip to first unread message

P5music

unread,
Apr 30, 2021, 3:42:34 PM4/30/21
to CodenameOne Discussions

I need to get rid of right sidemenu, still mantaining the menu button on the topbar/toolbar
Indeed I put the MATERIAL_MENU icon as right command there, but I need to have some listener of the button press. Is it right? I cannot check today because the CN1 plugin is broken on my installations.
The menu must not appear, even in background or hidden because I am checking if I can restore the user interface of my app.
I had to create some special points in the code where the menu has to be closed forcefully.
Indeed there happen sequences of
menu-open
menu-close
menu-open
menu-close
menu-open
menu-close
menu-open
menu-close
etc
at some points
and it is bad for my special class that handles dialogs.
The workaround were enough on the simulator and on Android but not iOS, so I have to get rid of the menu and use a dialog for it.
Thanks in advance

Shai Almog

unread,
May 1, 2021, 1:33:48 AM5/1/21
to CodenameOne Discussions
If you add a right side material command it should give you a callback when the menu button is pressed.
I don't understand the problem, if you already use a side command you can just use a dialog instead of a menu.
Reply all
Reply to author
Forward
0 new messages