Created
January 20, 2016 13:13
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Sample usage code for https://www.codenameone.com/javadoc/com/codename1/ui/Dialog.html and https://www.codenameone.com/javadoc/com/codename1/components/SpanLabel.html
From the Codename One project