Hey everyone,
I made an app which main use is to display the time and other information. This App is running on several Tablets (Motorola Xoom) and is deployed on a tomcat 7. I also made it to be endless by automaticaly reloading the page when the session is expired/server restarts.
The only problem i have is that the auto-zoom-(out) is sometimes causing a part of the layout being not displayed. How this happens: The size of my main layout is 1280x745. When you open the app on the tablet it first shows the part roughly around 750x500 (just a wild guess). Then it automaticaly zooms out to fit the size of the app which causes it to display only the part in 1280x500. The bottom part is cut off. In my Vaadin 6 version i had a workaround which wasn’t really reliable (Sometimes after a server restart the bottom was still cut off). Now i updated my project to Vaadin 7.0.3 and for that redid my layout-setup so that i thought it would work better but now it just doesn’t work at all.
My layout setup:
UI main = UI.getCurrent()
main.setSizeFull();
main.setHeight("745px");
main.setWidth("1280px"); //If i don't set the width/height the tablet won't autoscroll at all
main.setImmediate(true);
CssLayout css_main = new CssLayout();
css_main.setImmediate(true);
main.setContent(css_main);
main.getContent().setSizeFull();
vl_pnlmain = new VerticalLayout();
vl_pnlmain.setWidth("1275px");
vl_pnlmain.setHeight("745px");
vl_pnlmain.setStyleName("rbomain"); //style just sets a background-image
vl_pnlmain.setImmediate(true);
css_main.addComponent(vl_pnlmain);
//all the other content is added to vl_pnlmain
In my Vaadin 6 version i had a panel between the csslayout and the verticallayout which worked at first but then i had the problem that you were able to scroll the app to a point where you can’t see anything from the layout anymore. The reason was that the Scrollable inside the Panel had a much larger height then its content. I tried to solve that problem by adding a style to the panel which sets the scrollable’s height to 745px but that just causes the cut-off-issue. My workaround there was to use a refresher to set the style after 2 seconds when the tablet normally finished zooming out. The problem there was that it sometimes still cut off the bottom.
Did anyone experience similar problems using tablets and does anyone know a better workaround to my problem?
Best regards,
M R