ScreenOrientation


Purpose

The screen orientation API enables setting allowed screen orientations on a page level. Specifically, it may be used to lock the screen's orientation, regardless of the position of the device.

Please refer to the table below for a detailed list of orientation combinations supported by each of the device platforms.

Note

This API does not work on iOS 9 iPad devices, when multitasking is enabled. In Hybrid Container, multitasking is enabled by default.

Module

This object belongs to the Screen Orientation product module.

JavaScript API

The screen orientation API contains the following:

Abstraction/Class Methods Description
ScreenOrientation

Consists of the screen orientation object.

The object can be accessed using the launchbox.ScreenOrientation reference.

setAllowed

Enables to set the allowed screen orientation settings to the ScreenOrientation object.

Supported screen orientation combinations

The following table lists orientation combinations supported by each of the device platforms. Screen orientation settings are defined as follows:

  • pp - portrait

  • pd - portrait upside down

  • ll - landscape left

  • lr - landscape right

Combination Android iOS
pp yes yes
pd yes yes
ll yes yes
lr yes yes
pp, pd yes*) yes
pd, ll yes
ll, lr yes yes
pp, ll yes
pd, lr yes
pp, lr yes
pp, pd, ll yes
pd, ll, lr yes
pp, ll, lr yes
pp, pd, lr yes
pp, pd, ll, lr yes yes

*) May not work on some devices.

**) Has no effect on currently available devices.

Related topics

Public API reference
Screen Orientation example
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Feedback
Advanced...