The softkey label area used for commands in the standard MIDP Canvas
takes up a significant amount of the screen area.
Therefore, the Nokia UI API includes the com.nokia.mid.ui.FullCanvas
class, which
doesn’t accept commands and thus uses the entire screen area for drawing.
In particular, game MIDlets are likely to use FullCanvas
. All indicators, such as battery level and network usage indicators
are displayed on top of a full screen Canvas
.
If your MIDlet does HTTP networking, for example, you should bear
this in mind when designing the MIDlet’s screen layout.
FullCanvas
does not support adding commands,
and will throw an IllegalStateException
if the addCommand
or setCommandListener
methods
are called. Instead, the softkeys will be reported using Canvas
’s keyPressed
etc. methods,
and FullCanvas
defines some extra key codes for
the softkeys, arrow keys, Send (the green phone key used for starting
a call), and End (the red phone key used for ending a call).
In many devices, pressing the End key immediately terminates the MIDlet, so developers should not rely on getting key events for it.
In a well-written MIDlet, pressing any softkey will pause the action on the screen and return the user to the MIDlet’s menu screen. This is preferable to emulating command labels yourself, as it is likely that emulated commands will interact differently to the device’s native commands, possibly confusing the user.