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

ExtensionDisplayFeature

open class ExtensionDisplayFeature
kotlin.Any
   ↳ androidx.window.extensions.ExtensionDisplayFeature

Description of a physical feature on the display.

Summary

Constants

static Int

A fold in the flexible screen without a physical gap.

static Int

A physical separation with a hinge that allows two display panels to fold.

Public constructors

<init>(@NonNull bounds: Rect, type: Int)

Public methods

open Boolean
equals(@Nullable other: Any?)

open Rect

Get the bounding rect of the display feature in window coordinate space.

open Int

Get the type of the display feature.

open Int

Constants

TYPE_FOLD

static val TYPE_FOLD: Int

A fold in the flexible screen without a physical gap.

Value: 1

TYPE_HINGE

static val TYPE_HINGE: Int

A physical separation with a hinge that allows two display panels to fold.

Value: 2

Public constructors

<init>

ExtensionDisplayFeature(
    @NonNull bounds: Rect,
    type: Int)

Public methods

equals

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

getBounds

@NonNull open fun getBounds(): Rect

Get the bounding rect of the display feature in window coordinate space.

getType

open fun getType(): Int

Get the type of the display feature.

hashCode

open fun hashCode(): Int