I have an Android App that uses several popup dialogs.
I could figure out quite well how to style them, but there is still a big padding that looks odd on the screen.
Especially the top padding is huge. Seems to me that this the space for the title area.
I have tried to remove it with d.getTitleComponent().remove()
, but to no avail.
How can I reduce the padding?
This is my code:
Button buttonDialog = new Button("Okay");
Dialog d = new Dialog();
TextArea popupBody = new TextArea("text.... !", 4, 10);
popupBody.setUIID("PopupBody");
popupBody.setEditable(false);
d.setLayout(new BorderLayout());
d.setDialogUIID("Popup");
d.setDisposeWhenPointerOutOfBounds(true);
d.add(BorderLayout.CENTER, popupBody);
d.add(BorderLayout.SOUTH,label);
d.add(BorderLayout.NORTH,buttonDialog);
d.showPopupDialog(buttonAgain);
CSS is like this:
Popup {
background-color: white;
border-radius: 5pt;
padding: 0pt;
}
PopupBody {
border: 2pt solid red;
border-radius: 5pt;
color: white;
font-size: 8pt;
padding: 35pt;
}