Supporting multiple form-factors using skins
Skins provide support for multiple form factors in a single executable file for devices of the same OS family.
Skins are a sub-variant of an environment.
Skins are packaged together in one application.
The decision on which skin to use is made automatically at run time.
Skins are created by using the IBM MobileFirst Platform Foundation Application Skin wizard.
The skins are placed in directories that are next to the corresponding environment directory.
Before a skin can be added, first add the environment for which you want to create the skin.
A skin folder contains the following folders: images, CSS, and js.
Create new .css and .js files in the corresponding folders.
To extend existing code and styling from the default skin, use the same filenames as those of the default skin.
To create new code and styling, use different filenames than those in of the default skin. When you choose this option, you need to copy the HTML file to the skin folder. You must also change the reference to the .js and .css files in the HEAD element of the HTML file.
All skins for a specific environment are packaged within the app.
Applying skins at run time
It determines which skin to load.
The default skinLoader.js contains examples of code.
Skins are automatically registered in application-descriptor.xml.
Registration determines the ordering of hierarchy between the common folder, environment, and skin.
If you remove a skin from the project, application-decsriptor.xml must be manually modified.