Device Stylesheet

Table of Contents

deviceStylesheet

With each mobile device having distinct looks and feels, all mobility components available with this distribution are styled according to the device upon which they appear. Each of these components was themed, and only the theme for each device is loaded for the application. An iPhone user will only have the iphone css files served for their application as will an Android and Blackberry user. The function of this component has been copied over into the newer DeviceResource component which also adds support for view port meta information in the head of the page.

Usage

There are really two ways to use this component. The main usage is to detect the device being used and to serve only the css pertaining to that device in a single css file. Users of Blackberry, Android, iPhone, iPad and desktop users will be able to connect to the same application yet see the theme that resembles their individual device without any extra effort on the developer's behalf.

Simply place this tag in the head of your template or facelet page.

<html.....xmlns:mobi="http://www.icesoft.com/icefaces/mobile/component">
...
<h:head>
    <mobi:deviceStylesheet/>
</h:head>
<h:body>
........

</h:body>

</html>

This component will take care of loading the correct device-detected css. Currently those are iPhone, Android and Blackberry. Default will be iPhone for desktop browsers and iPad.

This tag may also be used to load the various css resources as it does in mobile-showcase application:-

   <mobi:deviceStylesheet  name="#{themeSwitcher.theme}" />

Since all themes reside in a single library, the library will default to the correct library of
org.icefaces.component.skins

Themes

  • base: Structural CSS required for custom themes or when using 3rd party jQuery Mobile Themes
  • iphone: iPhone (iOS6) Theme
  • ipad: iPad (iOS6) Theme
  • bberry: BlackBerry 6/7 Theme
  • bb10: BlackBerry 10 Theme
  • android_light: Android Holo Light Theme
  • android_dark: Android Holo Dark Theme
  • ios7: iOS7 Theme

Component Documentation

deviceStylesheet

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2016 ICEsoft Technologies Canada Corp.