setPreferredSize deprecated, however w/o size intervention the Dialog is 25% of the screen

7 views
Skip to first unread message

shop.servic...@gmail.com

unread,
Jan 18, 2019, 11:42:40 AM1/18/19
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, Android & IOS

            Dialog dlg = new Dialog("Select Service Job");
            dlg.setPreferredSize(new Dimension(Display.getInstance().getDisplayHeight(), Display.getInstance().getDisplayWidth()));
            dlg.setUIID("Dialog");

Is there an acceptable alternative to force a Dialog to consume the full screen?

Thanks in Advance.

Shai Almog

unread,
Jan 19, 2019, 3:25:06 AM1/19/19
to CodenameOne Discussions
Use dlg.show(int, int, int, int) which lets you explicitly size the dialog. Alternatively if you cover the content of the dialog there are several strategies to set its size correctly.

shop.servic...@gmail.com

unread,
Jan 19, 2019, 9:19:46 AM1/19/19
to CodenameOne Discussions
Thanks
Reply all
Reply to author
Forward
0 new messages