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

DisplayFeature

class DisplayFeature
kotlin.Any
   ↳ androidx.window.DisplayFeature

Description of a physical feature on the display.

A display feature is a distinctive physical attribute located within the display panel of the device. It can intrude into the application window space and create a visual distortion, visual or touch discontinuity, make some area invisible or create a logical divider or separation in the screen space.

Summary

Nested classes

Builder for DisplayFeature objects.

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 methods
Rect

Get bounding rectangle of the physical display feature in the coordinate space of the window.

Int

Get type of the physical display feature.

String

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 methods

getBounds

@NonNull fun getBounds(): Rect

Get bounding rectangle of the physical display feature in the coordinate space of the window. The rectangle provides information about the location of the feature in the window and its size.

getType

fun getType(): Int

Get type of the physical display feature.

toString

@NonNull fun toString(): String