Google is committed to advancing racial equity for Black communities. See how.

ScreenOrientation

class ScreenOrientation
kotlin.Any
   ↳ androidx.browser.trusted.ScreenOrientation

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

Summary

Constants
static 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.

static Int

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

static 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.

static Int

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

static Int

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

static Int

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

static 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.

static Int

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

static Int

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

Constants

ANY

static val ANY: 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.

Value: 5

DEFAULT

static val DEFAULT: Int

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

Value: 0

LANDSCAPE

static val LANDSCAPE: 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.

Value: 6

LANDSCAPE_PRIMARY

static val LANDSCAPE_PRIMARY: 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.

Value: 3

LANDSCAPE_SECONDARY

static val LANDSCAPE_SECONDARY: 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.

Value: 4

NATURAL

static val NATURAL: 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.

Value: 8

PORTRAIT

static val PORTRAIT: 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.

Value: 7

PORTRAIT_PRIMARY

static val PORTRAIT_PRIMARY: 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.

Value: 1

PORTRAIT_SECONDARY

static val PORTRAIT_SECONDARY: 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.

Value: 2