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

ExtensionDeviceState

public class ExtensionDeviceState
extends Object

java.lang.Object
   ↳ androidx.window.extensions.ExtensionDeviceState


Information about the current state of the device.

Currently only includes the description of the state for foldable devices.

Summary

Constants

int POSTURE_CLOSED

int POSTURE_FLIPPED

int POSTURE_HALF_OPENED

int POSTURE_OPENED

int POSTURE_UNKNOWN

Public constructors

ExtensionDeviceState(int posture)

Public methods

boolean equals(Object obj)
int getPosture()

Get the current posture of the foldable device.

int hashCode()

Inherited methods

Constants

POSTURE_CLOSED

public static final int POSTURE_CLOSED

Constant Value: 1 (0x00000001)

POSTURE_FLIPPED

public static final int POSTURE_FLIPPED

Constant Value: 4 (0x00000004)

POSTURE_HALF_OPENED

public static final int POSTURE_HALF_OPENED

Constant Value: 2 (0x00000002)

POSTURE_OPENED

public static final int POSTURE_OPENED

Constant Value: 3 (0x00000003)

POSTURE_UNKNOWN

public static final int POSTURE_UNKNOWN

Constant Value: 0 (0x00000000)

Public constructors

ExtensionDeviceState

public ExtensionDeviceState (int posture)

Parameters
posture int

Public methods

equals

public boolean equals (Object obj)

Parameters
obj Object

Returns
boolean

getPosture

public int getPosture ()

Get the current posture of the foldable device.

Returns
int

hashCode

public int hashCode ()

Returns
int