ScreenOrientation


class ScreenOrientation


Represents screenOrientationLock type value of a Trusted Web Activity: https://www.w3.org/TR/screen-orientation/#screenorientation-interface

Summary

Constants

const Int
ANY = 5

Any is an orientation that means the screen can be locked to any one of portrait-primary, portrait-secondary, landscape-primary and landscape-secondary.

const Int

The default screen orientation is the set of orientations to which the screen is locked when there is no current orientation lock.

const Int

Landscape is an orientation where the screen width is greater than the screen height and depending on platform convention locking the screen to landscape can represent landscape-primary, landscape-secondary or both.

const Int

Landscape-primary is an orientation where the screen width is greater than the screen height.

const Int

Landscape-secondary is an orientation where the screen width is greater than the screen height.

const Int

Natural is an orientation that refers to either portrait-primary or landscape-primary depending on the device's usual orientation.

const Int

Portrait is an orientation where the screen width is less than or equal to the screen height and depending on platform convention locking the screen to portrait can represent portrait-primary, portrait-secondary or both.

const Int

Portrait-primary is an orientation where the screen width is less than or equal to the screen height.

const Int

Portrait-secondary is an orientation where the screen width is less than or equal to the screen height.

Constants

ANY

Added in 1.3.0
const val ANY = 5: Int

Any is an orientation that means the screen can be locked to any one of portrait-primary, portrait-secondary, landscape-primary and landscape-secondary.

DEFAULT

Added in 1.3.0
const val DEFAULT = 0: Int

The default screen orientation is the set of orientations to which the screen is locked when there is no current orientation lock.

LANDSCAPE

Added in 1.3.0
const val LANDSCAPE = 6: Int

Landscape is an orientation where the screen width is greater than the screen height and depending on platform convention locking the screen to landscape can represent landscape-primary, landscape-secondary or both.

LANDSCAPE_PRIMARY

Added in 1.3.0
const val LANDSCAPE_PRIMARY = 3: Int

Landscape-primary is an orientation where the screen width is greater than the screen height. If the device's natural orientation is landscape, then it is in landscape-primary when held in that position.

LANDSCAPE_SECONDARY

Added in 1.3.0
const val LANDSCAPE_SECONDARY = 4: Int

Landscape-secondary is an orientation where the screen width is greater than the screen height. If the device's natural orientation is landscape, it is in landscape-secondary when rotated 180° from its natural orientation.

NATURAL

Added in 1.3.0
const val NATURAL = 8: Int

Natural is an orientation that refers to either portrait-primary or landscape-primary depending on the device's usual orientation. This orientation is usually provided by the underlying operating system.

PORTRAIT

Added in 1.3.0
const val PORTRAIT = 7: Int

Portrait is an orientation where the screen width is less than or equal to the screen height and depending on platform convention locking the screen to portrait can represent portrait-primary, portrait-secondary or both.

PORTRAIT_PRIMARY

Added in 1.3.0
const val PORTRAIT_PRIMARY = 1: Int

Portrait-primary is an orientation where the screen width is less than or equal to the screen height. If the device's natural orientation is portrait, then it is in portrait-primary when held in that position.

PORTRAIT_SECONDARY

Added in 1.3.0
const val PORTRAIT_SECONDARY = 2: Int

Portrait-secondary is an orientation where the screen width is less than or equal to the screen height. If the device's natural orientation is portrait, then it is in portrait-secondary when rotated 180° from its natural position.