Framework applications are generally built for specific resolutions. To accomplish this, each application needs a set of layout modules and resolution specific style sheets (see layout and styling).
Layout Modules
Layout modules allow resolution specific css, images and other data to be made available to an application.
The frameworkâs device configuration files assume that at a minimum, layout modules and css for the following display modes exist within the application.
Mode
Width (pixels)
Height (pixels)
Layout Module
1080p
1920
1080
APP_ID/appui/layouts/1080p
720p
1280
720
APP_ID/appui/layouts/720p
540p
960
540
APP_ID/appui/layouts/540p
Where APP_ID is the application id defined in index.php and substituted into the device configurations on load.
The framework will select the largest resolution which will fit a device without scaling.
Example Modules
Below are minimal layout files for these three resolutions.
The css links are relative to the style directory passed in to the constructor of the application module.
In this case that was static/style/, so if using the above layouts, the layout specific css files required are
static/style/layouts/1080p.css
static/style/layouts/720p.css
static/style/layouts/540p.css
These can be empty, but they need to exist or you will encounter load errors.
Base style sheet
In addition to the specific layouts, there will be styles that need to apply to elements regardless of resolution.
Some defaults are required in order for widgets to render correctly.
The base style sheet handles these defaults and resolution independent styles. It was loaded by index.php from static/style/layout.css