The second Android 11 Developer Preview is now available, test it out and share your feedback.

ExtensionDeviceState

open class ExtensionDeviceState
kotlin.Any
   ↳ 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

static Int

static Int

static Int

static Int

static Int

Public constructors

<init>(posture: Int)

Public methods

open Boolean
equals(@Nullable other: Any?)

open Int

Get the current posture of the foldable device.

open Int

Constants

POSTURE_CLOSED

static val POSTURE_CLOSED: Int
Value: 1

POSTURE_FLIPPED

static val POSTURE_FLIPPED: Int
Value: 4

POSTURE_HALF_OPENED

static val POSTURE_HALF_OPENED: Int
Value: 2

POSTURE_OPENED

static val POSTURE_OPENED: Int
Value: 3

POSTURE_UNKNOWN

static val POSTURE_UNKNOWN: Int
Value: 0

Public constructors

<init>

ExtensionDeviceState(posture: Int)

Public methods

equals

open fun equals(@Nullable other: Any?): Boolean

getPosture

open fun getPosture(): Int

Get the current posture of the foldable device.

hashCode

open fun hashCode(): Int