Skip to content

Instantly share code, notes, and snippets.

@codenameone
Created January 20, 2016 13:13
Show Gist options
  • Save codenameone/60ca2cc54eea0cb12ede to your computer and use it in GitHub Desktop.
Save codenameone/60ca2cc54eea0cb12ede to your computer and use it in GitHub Desktop.
Code to show the Dialog dlg at the bottom 1/8th of the screen, it will dispose when clicking out of bounds
Dialog dlg = new Dialog("At Bottom");
dlg.setLayout(new BorderLayout());
// span label accepts the text and the UIID for the dialog body
dlg.add(new SpanLabel("Dialog Body text", "DialogBody"));
int h = Display.getInstance().getDisplayHeight();
dlg.setDisposeWhenPointerOutOfBounds(true);
dlg.show(h /8 * 7, 0, 0, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment