Java Reference
In-Depth Information
4.8 Handling Screen and Display Diversity
All Java ME developers are familiar with issues of screen and display
differences.
4.8.1 Proprietary Solutions
In S60 5th Edition and some of the S60 3rd Edition devices, proprietary
JAD attributes were introduced to automatically handle scaling and
orientation switches. For the full list of proprietary S60 JAD attributes
please refer to the Java ME Developer Library. 2
Nokia-MIDlet-Target-Display-Size specifies the target size
for the MIDlet and Nokia-MIDlet-Original-Display-Size spec-
ifies the screen for which the MIDlet was designed. Automatic scaling
does not distort image aspect ratio. The content is scaled to fit the display
dimensions and then centered on the display with black color used to fill
at the sides (see Figure 4.12).
(a)
(b)
Figure 4.12 Setting a constant MIDlet display area
An additional attribute Nokia-MIDlet-Canvas-Scaling-
Orientation-Switch indicates if the MIDlet can support the res-
olution specified in Nokia-MIDlet-Original-Display-Size in
both portrait and landscape resolutions. For example, you could specify
that your MIDlet display area is 240x320 in both portrait and landscape
modes by specifying in the JAD:
Nokia-MIDlet-Canvas-Scaling-Orientation-Switch: false
Nokia-MIDlet-Original-Display-Size: 240,320
2 www.forum.nokia.com/document/JavaMEDevelopers Library/
Search WWH ::




Custom Search