Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 05: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 Wiki
Jump to: navigation, search
Article Metadata
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 05:49.
68 page views in the last 30 days.