DisplayCutoutCompat

public final class DisplayCutoutCompat


Represents the area of the display that is not functional for displaying content.

DisplayCutoutCompat instances are immutable.

Summary

Public constructors

DisplayCutoutCompat(
    @Nullable Rect safeInsets,
    @Nullable List<Rect> boundingRects
)

Creates a DisplayCutout instance.

DisplayCutoutCompat(
    @NonNull Insets safeInsets,
    @Nullable Rect boundLeft,
    @Nullable Rect boundTop,
    @Nullable Rect boundRight,
    @Nullable Rect boundBottom,
    @NonNull Insets waterfallInsets
)

Creates a DisplayCutout instance.

Public methods

@Override boolean
@NonNull List<Rect>

Returns a list of Rects, each of which is the bounding rectangle for a non-functional area on the display.

int

Returns the inset from the bottom which avoids the display cutout in pixels.

int

Returns the inset from the left which avoids the display cutout in pixels.

int

Returns the inset from the right which avoids the display cutout in pixels.

int

Returns the inset from the top which avoids the display cutout in pixels.

@NonNull Insets

Returns the insets representing the curved areas of a waterfall display.

@Override int
@NonNull @Override String

Public constructors

DisplayCutoutCompat

public DisplayCutoutCompat(
    @Nullable Rect safeInsets,
    @Nullable List<Rect> boundingRects
)

Creates a DisplayCutout instance.

Parameters