Skip to main content

DeviceOrientation

Supported physical orientations for mobile devices.

Inherits: enum.Enum

Properties

  • LANDSCAPE_LEFT - Device rotated 90° counter-clockwise (home button or primary edge on the right).
  • LANDSCAPE_RIGHT - Device rotated 90° clockwise (home button or primary edge on the left).
  • PORTRAIT_DOWN - Device held upside-down in portrait mode.
  • PORTRAIT_UP - Device held upright in portrait mode.

Examples

Mobile device orientation configuration

See the Page mobile device orientation example, which demonstrates how to use DeviceOrientation with Page.set_allowed_device_orientations().

Properties

LANDSCAPE_LEFTclass-attributeinstance-attribute

Device rotated 90° counter-clockwise (home button or primary edge on the right).

LANDSCAPE_RIGHTclass-attributeinstance-attribute

Device rotated 90° clockwise (home button or primary edge on the left).

PORTRAIT_DOWNclass-attributeinstance-attribute

Device held upside-down in portrait mode.

PORTRAIT_UPclass-attributeinstance-attribute

Device held upright in portrait mode.