# ScreenOrientation

Artifact: [androidx.browser:browser](https://developer.android.com/jetpack/androidx/releases/browser) [View Source](https://cs.android.com/search?q=file:androidx/browser/trusted/ScreenOrientation.java+class:androidx.browser.trusted.ScreenOrientation) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

*** ** * ** ***


```
class ScreenOrientation
```

<br />

*** ** * ** ***

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

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#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 https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#DEFAULT() = 0` The default screen orientation is the set of orientations to which the screen is locked when there is no current orientation lock. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#LANDSCAPE() = 6` 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 https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#LANDSCAPE_PRIMARY() = 3` Landscape-primary is an orientation where the screen width is greater than the screen height. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#LANDSCAPE_SECONDARY() = 4` Landscape-secondary is an orientation where the screen width is greater than the screen height. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#NATURAL() = 8` Natural is an orientation that refers to either portrait-primary or landscape-primary depending on the device's usual orientation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#PORTRAIT() = 7` 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 https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#PORTRAIT_PRIMARY() = 1` Portrait-primary is an orientation where the screen width is less than or equal to the screen height. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/browser/trusted/ScreenOrientation#PORTRAIT_SECONDARY() = 2` 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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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](https://developer.android.com/jetpack/androidx/releases/browser#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.