ScreenOrientation
public
final
class
ScreenOrientation
extends Object
java.lang.Object | |
↳ | androidx.browser.trusted.ScreenOrientation |
Represents screenOrientationLock type value of a Trusted Web Activity: https://www.w3.org/TR/screen-orientation/#screenorientation-interface
Summary
Constants | |
---|---|
int |
ANY
Any is an orientation that means the screen can be locked to any one of portrait-primary, portrait-secondary, landscape-primary and landscape-secondary. |
int |
DEFAULT
The default screen orientation is the set of orientations to which the screen is locked when there is no current orientation lock. |
int |
LANDSCAPE
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. |
int |
LANDSCAPE_PRIMARY
Landscape-primary is an orientation where the screen width is greater than the screen height. |
int |
LANDSCAPE_SECONDARY
Landscape-secondary is an orientation where the screen width is greater than the screen height. |
int |
NATURAL
Natural is an orientation that refers to either portrait-primary or landscape-primary depending on the device's usual orientation. |
int |
PORTRAIT
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. |
int |
PORTRAIT_PRIMARY
Portrait-primary is an orientation where the screen width is less than or equal to the screen height. |
int |
PORTRAIT_SECONDARY
Portrait-secondary is an orientation where the screen width is less than or equal to the screen height. |
Inherited methods | |
---|---|
Constants
ANY
public static final int ANY
Any is an orientation that means the screen can be locked to any one of portrait-primary, portrait-secondary, landscape-primary and landscape-secondary.
Constant Value: 5 (0x00000005)
DEFAULT
public static final int DEFAULT
The default screen orientation is the set of orientations to which the screen is locked when there is no current orientation lock.
Constant Value: 0 (0x00000000)
LANDSCAPE
public static final int LANDSCAPE
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.
Constant Value: 6 (0x00000006)
LANDSCAPE_PRIMARY
public static final int LANDSCAPE_PRIMARY
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.
Constant Value: 3 (0x00000003)
LANDSCAPE_SECONDARY
public static final int LANDSCAPE_SECONDARY
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.
Constant Value: 4 (0x00000004)
NATURAL
public static final int NATURAL
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.
Constant Value: 8 (0x00000008)
PORTRAIT
public static final int PORTRAIT
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.
Constant Value: 7 (0x00000007)
PORTRAIT_PRIMARY
public static final int PORTRAIT_PRIMARY
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.
Constant Value: 1 (0x00000001)
PORTRAIT_SECONDARY
public static final int PORTRAIT_SECONDARY
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.
Constant Value: 2 (0x00000002)