rim:orientation element
Supported platforms
-
BlackBerry OS: 5.0 - 7.0 -
BlackBerry PlayBook OS: 2.0+ -
BlackBerry 10 OS: Supported through the
<param>
element.
Syntax
<rim:orientation mode="string"/>
Description
The <rim:orientation> element specifies the orientation for screens in your BlackBerry WebWorks application. This element is optional.
For BlackBerry smartphones apps running BlackBerry 7 or earlier, this element is available with BlackBerry WebWorks SDK for Smartphones 2.3 and later.
Parent elements
Child elements
None
Occurrences
Zero or one
Modes
You can specify one of following values for the mode attribute:
| Mode | Description | Platform |
|---|---|---|
| auto |
The auto mode specifies that screen orientation changes according to the orientation of the BlackBerry device. By default, if you do not specify the rim:orientation element, do not specify it with any attribute, or specify it incorrectly, the orientation is set to auto. |
|
| portrait |
The portrait mode specifies that screen orientation remains in portrait mode, regardless of the orientation of the device. |
|
| landscape |
The landscape mode specifies that screen orientation remains in landscape mode, regardless of the orientation of the device. |
|
| north |
The north mode specifies that the screen locks to an orientation where the top of the application is aligned to the physical top of the device (for example, the "top" on BlackBerry smartphones is typically where the speaker is located). This mode is available only in BlackBerry WebWorks SDK for Smartphones 2.3 and later. |
|
Example: Specifying a screen orientation
<rim:orientation mode="portrait" />