icons with 57×57, 72×72, and 144×144 pixels, and Android devices 36×36, 48×48, 72×72, and 96×96 pixels.
You can add an icon to the application icons collection with addApplicationIcon().You can acquire the base URL for your application from the servlet context, as shown in the following example.
TouchKitSettings s = getTouchKitSettings(); String contextPath = getServletConfig()
.getServletContext().getContextPath(); s.getApplicationIcons().addApplicationIcon(
contextPath + "VAADIN/themes/mytheme/icon.png");
The basic method just takes the icon name, while the other one lets you define its size. It also has a preComposed parameter, which when true, instructs Safari from adding effects to the icon in iOS.
Viewport Settings
The ViewPortSettings object, which you can get from the TouchKit settings with getViewPortSettings(), manages settings related to the display, most importantly the scaling limitations.
TouchKitSettings s = getTouchKitSettings(); ViewPortSettings vp = s.getViewPortSettings(); vp.setViewPortUserScalable(true);
...
See the Safari Development Library [http://developer.apple.com/library/safari/] at the Apple developer's site for more details regarding the functionality in the iOS browser.
Startup Image for iOS
iOS browser supports a startup (splash) image that is shown while the application is loading.You can set it in the IosWebAppSettings object with setStartupImage(). You can acquire the base URL for your application from the servlet context, as shown in the following example.
TouchKitSettings s = getTouchKitSettings();
String contextPath = getServletConfig().getServletContext()
.getContextPath(); s.getIosWebAppSettings().setStartupImage(
contextPath + "VAADIN/themes/mytheme/startup.png");
Web App Capability for iOS
iOS supports a special web app mode for bookmarks added and started from the home screen. With the mode enabled, the client may, among other things, hide the browser's own UI to give more space for the web application. The mode is enabled by a header that tells the browser whether the application is designed to be used as a web application rather than a web page.
TouchKitSettings s = getTouchKitSettings(); s.getIosWebAppSettings().setWebAppCapable(true);
See the Safari Development Library [http://developer.apple.com/library/safari/] at the Apple developer's site for more details regarding the functionality in the iOS browser.