S60 implementation supports all image formats that are supported in the underlying platform. In general, all common formats (JPG, GIF, PNG) are supported in all platforms. For a full list of supported formats, see Device specifications at Forum Nokia.
Image
s are supported in the following classes:
List
Alert
ChoiceGroup
ImageItem
Image
transparency is supported.
Note: It is not necessary to use an icon for a MIDlet or its UI elements.
If the MIDlet icon is not set, the default icon is used. If UI element icons
are set as null
, no icons are displayed.
The following image formats are supported for MIDlet icons:
BMP
EXIF
GIF
JPEG
MBM
MNG
PNG
TIFF
WBMP
ICO
WMF
SVG (S60 3rd Edition FP 2 and newer)
Transparency (both simple and alpha transparency) is supported.
No animation supported for MIDlet icons.
For SVG support, see section Scalable icon support.
In S60 devices, the icon defined in the MIDlet-Icon
attribute
is used only if the MIDlet-<n>
icon is not defined.
Note that the MIDlet suite icon or MIDlet icon is shown in Canvas
or Screen
(Form
, List
, and TextBox
) status pane in S60 3rd
Edition FP 1 devices, but not in Series 40 devices or S60 3rd Edition FP2
and newer devices.
The following tables describe the size of MIDlet icons in S60 and Series 40 devices with different display resolutions:
Device display resolution |
MIDlet icon in Applications menu (S60 3rd Edition and newer) |
MIDlet icon in Applications menu (S60 releases before 3rd Edition) |
MIDlet icon in the Screen status pane |
MIDlet icon in the Active standby application list (S60 2nd Edition FP 2 and newer) |
---|---|---|---|---|
176x208 |
31x31 |
42x29 |
44x44 |
26x26 |
208x176 |
37x37 |
n/a |
44x44 |
26x26 |
208x208 |
53x53 |
n/a |
53x53 |
26x26 |
240x320 & 320x240 |
48x48 |
n/a |
60x60 |
36x36 |
352x416 |
64x64 |
76x76 |
88x88 |
53x52 |
416x352 |
76x76 |
n/a |
88x88 |
53x52 |
Resolution |
MIDlet icon |
List icon |
ChoiceGroup icon |
Alert icon |
---|---|---|---|---|
128x128 |
16x16 |
16x16 |
12x12 |
21x36 |
128x160 |
24x24 |
16x16 |
12x12 |
21x36 |
208x208 |
46x46 |
26x26 |
22x22 |
40x50 |
240x320 |
46x48 |
28x28 |
22x22 |
58x76 |
Note: It is recommended to have transparent background in icon images. When
icon images use transparency, theme graphics are shown through the transparent
parts of an icon. Additionally, icons do not need to be rectangular. In List
icons,
the highlighted icon will also show through these transparent parts. Transparency
is available generally for PNG and GIF images.
The icon sizes for List
, ChoiceGroup
and Alert
in
different device resolutions are listed in the following table. These are
default values and should be considered for informative purposes only as these
may differ even between devices with the same resolution.
You can get the device-specific maximum width and height for LIST_ELEMENT
, CHOICE_GROUP_ELEMENT
and ALERT
image types by using the getBestImageWidth and getBestImageHeight methods.
Device display resolution |
List icon |
ChoiceGroup icon |
Alert icon |
---|---|---|---|
176x208 |
42x29 |
16x16 |
30x40 |
208x176 |
42x29 |
16x16 |
30x40 |
QVGA (240x320 & 320x240) |
57x41 |
21x21 |
40x53 |
QVGA2 (240x320 & 320x240) |
49x35 |
18x18 |
35x46 |
352x416 |
84x58 |
32x32 |
60x80 |
416x352 |
84x58 |
32x32 |
60x80 |
Series 40 devices include the following screen sizes:
Device display resolution |
List icon |
ChoiceGroup icon |
Alert icon |
---|---|---|---|
128x128 |
16x16 |
12x12 |
21x36 |
128x160 |
16x16 |
12x12 |
21x36 |
208x208 |
26x26 |
22x22 |
40x50 |
240x320 |
28x28 |
22x22 |
58x76 |
In S60 devices the screen layouts used with List
s
are determined by the following parameters:
Whether there is a selection graphic (EXCLUSIVE
, MULTIPLE
)
or not (IMPLICIT
);
Whether the text needs one or two lines (List.TEXT_WRAP_OFF
/ List.TEXT_WRAP_ON
).
Depending on these three parameters, List
items
might use a smaller or larger space. If a smaller space is required, the LIST_ELEMENT
icon
is replaced by the corresponding CHOICE_GROUP_ELEMENT
icon.
From S60 3rd edition FP2 onwards, the platform supports Scalable Vector Graphics (SVG-T version 1.1) icons as Java MIDlet icons whereas earlier platform versions supported only PNG icons and other bitmap graphics formats. Since there is a multitude of devices with different resolutions that show the MIDlet icons in different sizes, providing also SVG icons in the MIDlet makes the application icons generally look better in S60 devices.
It is recommended that for backwards compatibility you should also provide alternative PNG icons which can then be used if the device does not support SVG files or is otherwise unable to render them.
Nokia specific attributes Nokia-Scalable-Icon
and Nokia-Scalable-Icon-MIDlet-<n>
are
used to provide scalable MIDlet icons. These Nokia specific attributes have
priority over the standard MIDP attributes in the icon lookup order. The icon
file names and paths may contain spaces (U+0020). The icon file name is encoded
as UTF-8 .
The S60 SDK is bundled with a tool to convert normal SVG icons to SVG Tiny format that optimizes the SVG icon for the S60 SVG Engine.
On S60 3rd edition FP 2 also the standard MIDlet suite and MIDlet icon
attributes can contain SVG icon names. However, it is recommended that for
backwards compatibility you should provide only PNG icons in these standard
attributes and use the Nokia-Scalable-Icon
attributes
for providing the scalable icons. Doing this allows PNG icons to be presented
in devices without SVG support and devices having SVG support will use the
scalable icons for the same MIDlet.
To assign an SVG icon to a MIDlet, see the following code:
MIDlet-1: HelloWorldMIDlet, /bitmap_icon.png , example.hello.HelloWorldMIDlet Nokia-Scalable-Icon-MIDlet-1: /scalable_icon.svg
If SVG-T icons are not supported by the platform, the SVG file is not
used. It is possible to provide the link to the SVG file in the MIDlet-Icon
attribute.
If none of the MIDlet icons are supported by the implementation, the MIDlet suite icon is used. If none of the MIDlet suite icons are supported, the implementation uses a system default icon. If at any step the specified image file is in unsupported format or is corrupted, or the specified image cannot be found, then the lookup proceeds to the next step.