Hi Isomorphic,
I'm developing the mobile-version of our web-application. We want to give our customers an mobile application, that has a good look and fell in the mobile-sense.
Setup:
SmartClient Version: v11.1p_2018-05-30/PowerEdition Deployment (built 2018-05-30)
Browser: Cordova WebView for Android and iOS
So I made a custom menu like the following:

And here is the code for these items:
JAVA:
CSS:
Could there be any problem with this approach, regarding the used CSS?
Kind Regards
I'm developing the mobile-version of our web-application. We want to give our customers an mobile application, that has a good look and fell in the mobile-sense.
Setup:
SmartClient Version: v11.1p_2018-05-30/PowerEdition Deployment (built 2018-05-30)
Browser: Cordova WebView for Android and iOS
So I made a custom menu like the following:
And here is the code for these items:
JAVA:
Code:
public class MainMenuButtonVLayout extends VLayout {
MainAreaMobile parent;
Label listName;
Label listCount;
Label button;
Label overdueLabel;
Label totalLabel;
HLayout upperBar;
HLayout lowerBar;
public MainMenuButtonVLayout(MainAreaMobile parent) {
this.parent = parent;
}
public VLayout getMainMenuButtonVLayout(Boolean myLeads, String title, String overdue, String count, String iconURL) {
setAutoWidth();
setAutoHeight();
setAlign(Alignment.RIGHT);
button = new MenuLabel(iconURL);
button.setMargin(10);
button.setBaseStyle("customMainMenu");
button.setAlign(Alignment.CENTER);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
}
});
listName = new Label(title);
listName.setWidth("50%");
listName.setStyleName("customMainMenuCaption");
listName.setAlign(Alignment.CENTER);
upperBar = new HLayout();
upperBar.setAlign(Alignment.CENTER);
upperBar.setPadding(5);
upperBar.setAutoHeight();
lowerBar = new HLayout();
lowerBar.setAlign(Alignment.CENTER);
lowerBar.setMembers(listName);
lowerBar.setHeight(10);
lowerBar.setAlign(VerticalAlignment.TOP);
totalLabel = new totalLabel(count);
if (myLeads == true) {
totalLabel.setBaseStyle("customMainMenuTotalWithNotification");
Label notification = new NotificationLabel(overdue);
notification.setBaseStyle("customMainMenuNotification");
button.addChild(notification);
button.addChild(totalLabel);
} else {
totalLabel.setBaseStyle("customMainMenuTotal");
button.addChild(totalLabel);
}
upperBar.setMembers(button);
this.setMembers(upperBar, lowerBar);
return this;
}
private class MenuLabel extends Label {
public MenuLabel(String url) {
setIconSize(60);
setIcon(url);
setHeight(120);
setWidth(120);
}
}
private class NotificationLabel extends Label {
public NotificationLabel(String overdue) {
setContents(overdue);
setAlign(Alignment.CENTER);
setHeight(26);
setWidth(26);
}
}
private class totalLabel extends Label {
public totalLabel(String count) {
setContents(count);
setAlign(Alignment.CENTER);
setHeight(26);
setWidth(26);
}
}
}
Code:
.customMainMenu
{
border-radius:15%;
background-color: #d1d3d4;
border-right: 1px solid black ;
border-bottom: 1px solid black;
border-left: 1px solid black ;
border-top: 1px solid black ;
}
.customMainMenuNotification
{
border-radius: 13px 13px 13px 0px;
background-color: red;
position: relative;
left: 80px;
bottom: 5px;
color: white;
}
.customMainMenuTotal
{
border-radius: 0px 13px 13px 13px;
background-color: black;
position: relative;
left: 80px;
top: 80px;
color: white;
}
.customMainMenuTotalWithNotification
{
border-radius: 0px 13px 13px 13px;
background-color: black;
position: relative;
left: 80px;
top: 80px;
color: white;
}
.customMainMenuCaption
{
font-weight: bold;
padding-right: 5px;
padding-left: 5px;
padding-bottom: 5px;
}
Kind Regards
Comment