Creating custom dialog

75 views
Skip to first unread message

ser...@gmail.com

unread,
Jun 2, 2013, 2:58:41 AM6/2/13
to codenameone...@googlegroups.com
I am trying to create custom dialog that would look like a standard android dialog box similar to this:

But I found that there is DialogContentPane that I can't override or remove. It is not even visible in list of components. This pane always adds margins. Is it possible to get rid of it? 

Chen Fishbein

unread,
Jun 2, 2013, 4:01:25 AM6/2/13
to codenameone...@googlegroups.com, ser...@gmail.com
to create a custom look for dialogs you need to play around with some styles in the theme, I would suggest you open the leather theme and in the "Filter" textfield enter "Dialog", it will bring up the styles you need to manipulate to create your custom dialog.
 

ser...@gmail.com

unread,
Jun 2, 2013, 5:23:23 AM6/2/13
to codenameone...@googlegroups.com, ser...@gmail.com
I've done that. I setup margins and paddings of all dialog related styles to 0 but still the margin around the form still exists.
This happens only for android. If I select IOS native theme then everything seems as it is expected.

Chen Fishbein

unread,
Jun 2, 2013, 5:29:59 AM6/2/13
to codenameone...@googlegroups.com, ser...@gmail.com
can you post a screenshot and your theme.res

ser...@gmail.com

unread,
Jun 2, 2013, 6:23:06 AM6/2/13
to codenameone...@googlegroups.com, ser...@gmail.com
theme.res
dialog.png

Chen Fishbein

unread,
Jun 2, 2013, 6:38:55 AM6/2/13
to codenameone...@googlegroups.com, ser...@gmail.com
override the "DialogContentPane" style too.

Reply all
Reply to author
Forward
0 new messages