Class
Description
•
main scrollable section contained in a
VerticalFieldManager
•
default menu with a Close menu item
•
default close action when the BlackBerry device user clicks the Close menu
item or presses the Escape key
Create a screen
1.
Import the following classes:
•
net.rim.device.api.ui.Screen
•
net.rim.device.api.ui.container.FullScreen
•
net.rim.device.api.ui.container.MainScreen
2.
Extend the
Screen
class or one of its subclasses,
FullScreen
or
MainScreen
.
How the BlackBerry JVM manages screens
The BlackBerry® Java® Virtual Machine maintains
Screen
objects in a display stack, which is an ordered set of
Screen
objects. The screen at the top of the stack is the active screen that the BlackBerry device user sees. When a displays a screen, it
pushes the screen to the top of the stack. When a BlackBerry Java Application closes a screen, it removes the screen off the top
of the stack and displays the next screen on the stack, redrawing it as necessary. Each screen can appear only once in the display
stack. The BlackBerry JVM throws a runtime exception if a
Screen
that the BlackBerry Java Application pushes to the stack
already exists. A BlackBerry Java Application must remove screens from the display stack when the BlackBerry device user finishes
interacting with them so that the BlackBerry Java Application uses memory efficiently. Use only a few modal screens at one time,
because each screen uses a separate thread.
Provide screen navigation when using a MainScreen
Creating a
MainScreen
object provides default navigation to your BlackBerry® device application. Avoid using buttons or
other UI elements that take up space on the screen.
Development Guide
Screens
8