to top
Datalogic APIs
public final enum

ScreenRotationLockPolicy

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.datalogic.device.configuration.ScreenRotationLockPolicy

Class Overview

The ScreenRotationLockPolicy enumeration defines the screen rotation lock modes that can be applied to the device display. This enum controls how the screen orientation is handled and whether it automatically rotates based on device orientation sensors or remains locked to a specific orientation.

Supported only on devices running Android 15 or later.

Summary

Enum Values
ScreenRotationLockPolicy  INVERTED_LANDSCAPE  The screen is locked in inverted landscape orientation. 
ScreenRotationLockPolicy  INVERTED_PORTRAIT  The screen is locked in inverted portrait orientation. 
ScreenRotationLockPolicy  LANDSCAPE  The screen is locked in landscape orientation. 
ScreenRotationLockPolicy  PORTRAIT  The screen is locked in portrait orientation. 
ScreenRotationLockPolicy  SENSOR_DEPENDENT  The screen rotation is dependent on the device's orientation sensor. 
Public Methods
static ScreenRotationLockPolicy fromInt(int n)
Retrieves the corresponding ScreenRotationLockPolicy value from a valid integer.
int toInt()
Converts the enum constant to its corresponding integer ordinal value.
static ScreenRotationLockPolicy valueOf(String name)
final static ScreenRotationLockPolicy[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final ScreenRotationLockPolicy INVERTED_LANDSCAPE

Added in revision 51

The screen is locked in inverted landscape orientation. The display will not rotate and will remain in upside-down landscape mode.

public static final ScreenRotationLockPolicy INVERTED_PORTRAIT

Added in revision 51

The screen is locked in inverted portrait orientation. The display will not rotate and will remain in upside-down portrait mode.

public static final ScreenRotationLockPolicy LANDSCAPE

Added in revision 51

The screen is locked in landscape orientation. The display will not rotate and will remain in landscape mode regardless of device orientation.

public static final ScreenRotationLockPolicy PORTRAIT

Added in revision 51

The screen is locked in portrait orientation. The display will not rotate and will remain in portrait mode regardless of device orientation.

public static final ScreenRotationLockPolicy SENSOR_DEPENDENT

Added in revision 51

The screen rotation is dependent on the device's orientation sensor. The display will automatically rotate based on how the device is held.

Public Methods

public static ScreenRotationLockPolicy fromInt (int n)

Added in revision 51

Retrieves the corresponding ScreenRotationLockPolicy value from a valid integer. If the provided integer is not a valid ordinal, returns the default value SENSOR_DEPENDENT.

Parameters
n the integer value representing the ordinal position
Returns
  • the corresponding ScreenRotationLockPolicy enum constant, or SENSOR_DEPENDENT if invalid

public int toInt ()

Added in revision 51

Converts the enum constant to its corresponding integer ordinal value.

Returns
  • the ordinal value of this enum constant.

public static ScreenRotationLockPolicy valueOf (String name)

Added in revision 51

public static final ScreenRotationLockPolicy[] values ()

Added in revision 51