Blackberry Java Development Environment 4.7.0 Огляд - Сторінка 8
Переглянути онлайн або завантажити pdf Огляд для Програмне забезпечення Blackberry Java Development Environment 4.7.0. Blackberry Java Development Environment 4.7.0 16 сторінок.
Feature and Technical Overview
Accelerometer
The BlackBerry® Storm device includes an acclerometer that senses the orientation and acceleration of the device. When a
BlackBerry device user moves the device, the accelerometer senses the movement in 3-D space along the x, y, and z axis. A
BlackBerry device user can change the orientation of the device which can change the display direction of a screen for a BlackBerry
device application between portrait and landscape.
The Accelerometer APIs in the net.rim.device.api.system package let a BlackBerry device application respond to
the orientation and acceleration of a BlackBerry device. For example, you can manipulate a game application to change the
direction and speed of a moving object on the screen as a BlackBerry device user moves and rotates the BlackBerry device at
different speeds.
Screen display direction
When the orientation of the BlackBerry® Storm device changes, the display direction of the screen of a BlackBerry device
application can also change. The display direction refers to the top of the drawing area of the screen relative to the location of
the BlackBerry logo on the BlackBerry device. The display direction of an application screen can be north, south, east, west,
landscape, or portrait.
The BlackBerry® UI APIs now let a BlackBerry device application retrieve the display direction of the screen and prevent a
BlackBerry device from changing the display direction of the screen.
A BlackBerry device application can use the net.rim.device.api.system.Display.getOrientation()
method to retrieve the display direction of the screen. A BlackBerry device application can use
the net.rim.device.api.ui.UiEngineInstance .setAcceptableDirections(int) method to
set the screen to only display in certain directions when a BlackBerry device user changes the orientation of the BlackBerry Storm
device. For example, an application that displays a document could set the screen to always display in landscape mode.
Home screen background image
The BlackBerry® UI APIs now let a BlackBerry device application set the image that appears as the background of the Home
screen on a BlackBerry device.
A BlackBerry device application can use net.rim.blackberry.api.homescreen.HomeScreen.
setBackgroundImage(String uri) with an image file that resides in flash memory or a microSD Card to set the
background image. A typical format for the URI is "file:///store/home/user/pictures/file.jpg." Invoking
net.rim.blackberry.api.homescreen.HomeScreen. setBackgroundImage(String uri) will
override images that other applications have set.
6
Screen and UI