-
Notifications
You must be signed in to change notification settings - Fork 28
Resource Management
Status: 2012-01-04 - work in progress!
The resources management is for organizing the image and css files of a project. The problem when developing for several devices is, to that each supported device can demand a specific style and/or dedicated images. With the Espressos *resources management *, you can keep control over this mess.
The resources management let you define a specific structure, that represents a device of a specific manufacturer and with a specific resolution. Shown in the screen shot below. To compile a application for a device, the config.json can be configured, so Espresso will load the resources, like images and CSS files automatically for this device. When running the commands: Espresso build or Espresso server.
There where some changes in the resource management, du to the massive changes from Espresso 0.0.8-1 to 0.0.9.
The resource management implemented in 0.0.8-1 can be found here Resource management 0.0.8.1
The resource management implemented in 0.0.9 can be found here Resource management 0.0.9
The 0.0.9 can be found as 0.0.9-pre release in the Espresso development branch "crema" here: https://github.com/mwaylabs/Espresso/tree/crema and soon be in the master
Icons are PNG-files with a name like appicon.png
or appicon-{SIZE}.png
, where SIZE
is the pixel-size of the icon.
When the appropriate appicon-{SIZE}.png
is missing, and the relevant section of the config.json has set autoScaleImage
to true
, then Espresso will scale appicon.png
as required.
Note: If autoScaleImage
is to be used, then it should (at least) as large as the largest target icon size.
iOS uses following icon sizes:
-
appicon-57.png
->icon.png
-
appicon-114.png
->[email protected]
-
appicon-72.png
->icon-72.png
-
appicon-29.png
->icon-Small.png
-
appicon-50.png
->icon-Small-50.png
-
appicon-58.png
->[email protected]
See Apple's Custom Icon and Image Creation Guidelines for more information.
Android uses following icon sizes:
-
appicon-36.png
for ldpi-mode -
appicon-48.png
for mdpi-mode -
appicon-72.png
for hdpi-mode -
appicon-96.png
for xhdpi-mode
See Android's Icon Design Guidelines for more information.
The splash screen is a PNG-file with the name splash.png
that will be shown during start-up of the native application.
It should have the appropriate orientation for the application.
For iOS, please consult the Launch Image section of Apple's Custom Icon and Image Creation Guidelines.
Additionally iOS allows to have orientation-specific splash screens. To use this feature splash screen files with the name splash-ORIENTATION.png
may be put into the resource folders, where ORIENTATION
is one of Portrait
, PortraitUpsideDown
, Landscape
, LandscapeLeft
, or LandscapeRight
.