The MIDlet loads and displays a pre-generated static SVG image of a lion cub. The user can manipulate the image by zooming and rotating. The Series 40 full touch version of the MIDlet uses pinch gestures for zooming in and out of the image, and drag gestures for moving the image. The menu options include:
Zoom in
Zoom out
Rotate counter clockwise
Rotate clockwise
Restore zoom and rotation
Exit the MIDlet
The example application also contains Zoom and Move toggle buttons. Click Zoom to demonstrate the Pinch-to-zoom and Orientation simulation capabilities. For more information about using them, see Orientation simulation and Pinch-to-zoom simulation topics in Nokia Asha SDK User Guide > Emulator features. Click Move to demonstrate drag and drop capabilities on the SVG image.
Figure: Pre-generated static SVG image
The MIDlet consists of the following classes:
LoadStaticMidlet—MIDlet main class, which sets up the UI and menu options and displays the SVG image
SvgCanvas2—GameCanvas class that sets up and draws the SVG image
The Series 40 full touch version of the MIDlet uses the Mobile Sensor API to detect device orientation changes and rotate the image accordingly.
For information about implementing the MIDlet, see section Implementation.