Use this API to get the current screen orientation of the device.Documentation Index
Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
Use this file to discover all available pages before exploring further.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Success Callback Parameters
| Property | Type | Description |
|---|---|---|
| orientation | String | Current orientation: portrait, landscape, portraitUpsideDown, landscapeLeft, landscapeRight |
Code Example
Basic Usage
Adaptive Layout
Orientation Values
| Value | Description |
|---|---|
portrait | Device held upright |
landscape | Device held sideways |
portraitUpsideDown | Device held upside down |
landscapeLeft | Device rotated left |
landscapeRight | Device rotated right |
Related APIs
my.setScreenOrientation
Set screen orientation
my.onScreenOrientationChange
Listen for orientation changes