I am working on a multibutton that will have a hamburger style menu ( or 3
dots). Each button represents a document that can be on a server or on the
local file system. If the document is only on the server the multibutton
shows the name and a cloud. tapping the row, or the cloud downloads the
document and the icon changes to 3 dots. So far, so good. Tapping on the
row, now opens the document. Tapping on the 3 dots should popup a menu.
This menu now allows you to open, delete, rename, share, etc. I have two
problems in specific:
1. Simulator (nexus7), Android: Tapping back works. However tapping
outside the dialog should also dismiss it, it doesn't
2. Simulator (iOS), iOS - not yet tested on real device: How do I go back
at all? There is no physical back button and no tappable back appears, nor
does tapping outside the dialog dismiss it.
Here is the code:
protected void onBtn(DBAreas btn) {
Container cnt = new Container(new BoxLayout(BoxLayout.Y_AXIS));
cnt.add(new Button("Rename"));
cnt.add(new Button("Delete"));
Dialog dlg = new Dialog("CHANGEME", new BorderLayout());
dlg.add(BorderLayout.CENTER, cnt);
dlg.setBackCommand(new Command("") {
@Override
public void actionPerformed(ActionEvent evt) {
dlg.dispose();
}
});
dlg.showPacked(BorderLayout.CENTER, true);
}
And a screenshot fyi:
<https://lh3.googleusercontent.com/-G1QGsfb0mXI/WK2X3Ouk2PI/AAAAAAAAEtU/7W7QxZ8-H44IuQoAvQxPLABALvVMBHhOQCLcB/s1600/Screenshot%2Bfrom%2B2017-02-22%2B05-42-15.png>
Peter
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/b869ef4d-c4f7-4f43-bcfc-54ba8f947985%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.