×
Namespaces

Variants
Actions
Revision as of 08:49, 9 August 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MIDlet scaling in S60 5th Edition devices

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
CompatibilityArticle
Created: jarmlaht (29 Oct 2008)
Last edited: hamishwillee (09 Aug 2013)

S60 5th Edition introduced a new screen size of 360x640 pixels. Common screen size in other S60 devices is 240x320 pixels (QVGA). There are three JAD attributes for scaling MIDlets to fit better to this new larger screen size. Using the attributes listed in this article makes it possible to run existing MIDlets on Nokia 5800 XpressMusic screen. There might also be performance problems with MIDlets, which use the whole full screen as drawing area. Using smaller drawing area(, for example QVGA) and scaling it to Nokia 5800 XpressMusic screen might improve performance.

Four important JAD attributes used for MIDlet scaling:

  • Nokia-MIDlet-Canvas-Scaling-Orientation-Switch (possible values "true" or "false")
    • If true, indicates that the MIDlet can also support the given resolution in both portrait and landscape resolutions.
  • Nokia-MIDlet-Original-Display-Size (for example "240,320")
    • Specifies the screen for which the MIDlet was originally designed. (This should be only used in special cases - see note below.)
  • Nokia-MIDlet-Target-Display-Size (for example "360,640")
    • Specifies the target size for the MIDlet.
  • Nokia-MIDlet-On-Screen-Keypad ("no", "gameactions" or "navigationkeys")
    • Specifies the on-screen keypad for a Canvas application.

The image below shows, how Nokia-MIDlet-Original-Display-Size and Nokia-MIDlet-Target-Display-Size attributes can be used for MIDlet scaling.

MIDlet scaling.png

The image below shows, how Nokia-MIDlet-Canvas-Scaling-Orientation-Switch attribute is used for MIDlet scaling.

MIDlet scaling2.png

Nokia-MIDlet-Original-Display-Size and Nokia-MIDlet-Target-Display-Size attributes can be used for graphics scaling for full screen LCDUI Canvases. Scaling is done by the platform and it’s not visible to MIDlet.

It's important to note that the attribute Nokia-MIDlet-Target-Display-Size should only be used in special cases, for example when application resolution needs to be limited to a certain size or aspect ratio. If the attribute is not set, the MIDlet is scaled without changing aspect ratio to the display resolution of a device where MIDlet is run. If target resolution is specified the scaling is fixed to that particular resolution so there incompatbility issue if it's run in some other display resolutions. Specifying only the Nokia-MIDlet-Original-Display-Size allows MIDlet to run correctly in different resolution devices as it is scaled to device resolution (where Canvas graphics scaling is supported generally).

The attribute Nokia-MIDlet-Canvas-Scaling-Orientation-Switch was introduced to supplement the existing functionality. This attribute allows the MIDlet to define whether application supports orientation switching on the defined original display size resolution. Without setting this attribute to true, the scaling is always done to the same orientation regardless of actual device orientation.

Note also, that Nokia-MIDlet-App-Orientation attribute can be used to force either portrait or landscape UI orientation. The orientation is only fixed on devices that support the specific layout. The possible values for the attribute are "portrait" and "landscape".

See also

This page was last modified on 9 August 2013, at 08:49.
79 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×